@domoinc/funnel-label
v1.0.2
Published
FunnelLabel - Domo Widget
Downloads
5
Readme
FunnelLabel
Configuration Options
chartName
Type: string
Default: "FunnelLabel"
Name of chart for Reporting.
dividerChar
Type: string
Default: "|"
Character used to divide the value and high light value.
formatFunction
Type: n/a
Default: "function (d) {\n\t return i18n.summaryNumber(d);\n\t }"
Function used to format value.
height
Type: number
Default: 250
Units: px
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: undefined
Default: "#8A8D8F"
Color of the label
textFontFamily
Type: string
Default: "Open Sans"
textSize
Type: number
Default: 12
Units: px
updateSizeableConfigs
Type: boolean
Default: true
Flag for turning off the mimic of illustrator's scale functionality
valueColor
Type: color
Default: "#333"
width
Type: number
Default: 250
Units: px
Data Definition
label
Type: string
Default validate:
undefined
Default accessor:
function (line) {
return line[0] === undefined ? undefined : String(line[0]);
}
value
Type: number
Default validate:
undefined
Default accessor:
function (line) {
return Number(line[1]);
}
Events
Dispatch Events
External Events
Example
/*----------------------------------------------------------------------------------
Create Widget -> index.html
© 2011 - 2015 DOMO, INC.
----------------------------------------------------------------------------------*/
//Setup some fake data
var data = [
['Score', 9001]
];
//Initialze the widget
var chartGroup = d3.select('#vis')
.append('svg')
.attr({
height: '500px',
width: '500px'
})
.append('g')
.attr('transform', 'translate(100, 100)');
var chart = new FunnelLabel(chartGroup)
.c({
width: 250,
height: 250
});
//Render the chart with data
chart._notifier.showMessage(true);
chart.draw(data);