@domoinc/ca-digital-clock-with-text

4.1.2 • Public • Published

CADigitalClockWithText

Configuration Options

AmPmTextSize

Type: number
Default: 11
Units: px

Text size of AM/PM

chartName

Type: string
Default: "CADigitalClockWithText"

Name of chart for reporting

height

Type: number
Default: 250
Units: px

Height of the chart.

isOnMobile

Type: boolean
Default: false

If true, it signals to the widget that it is running on a mobile device. Should be called before draw and then NEVER changed.

shouldValidate

Type: boolean
Default: true

Flag for turning off data validation

textColor

Type: color
Default: "#f68c35"

Color of the time text

textFontFamily

Type: string
Default: "Open Sans"

Text font of the time text

timeTextSize

Type: number
Default: 29
Units: px

Text size of the time

updateSizeableConfigs

Type: boolean
Default: true

Flag for turning off the mimic of illustrator's scale functionality

width

Type: number
Default: 250
Units: px

Width of the chart.

Data Definition

Label

Type: string

Default validate:

function (d) { return this.accessor(d) !== undefined; }

Default accessor:

function (line) { return line[0] === undefined ? undefined : String(line[0]); }

Time

Type: date

Default validate:

function (d) { return (new Date(this.accessor(d)) !== 'Invalid Date') && moment(this.accessor(d), ['HH:mm', 'YYYY-MM-DD HH:mm'], true).isValid();}

Default accessor:

function (line) { return line[1]; }

Events

Dispatch Events

External Events

Example

//Setup some fake data
var data = [
	["DomoPalooza", "2014-07-19 00:00"]
];

//Initialze the widget
var chart = d3.select("#vis svg")
	.append('g')
	.attr('transform', 'translate(87, 227)')
	.chart("CADigitalClockWithText")
	.c({
		width: 91,
		height: 31
	});

//Render the chart with data
chart._notifier.showMessage(true);
chart.draw(data);

Readme

Keywords

Package Sidebar

Install

npm i @domoinc/ca-digital-clock-with-text

Weekly Downloads

0

Version

4.1.2

License

SEE LICENSE IN LICENSE

Last publish

Collaborators

  • ttingey
  • morganjohn12
  • jeff.smith
  • cameronnokes
  • congrieb
  • diazd2
  • statianzo
  • mountain01
  • th3uiguy
  • jasonleehodges
  • jmnemelka