@domoinc/domo-select
Version:
DomoSelect - Domo Widget
44 lines (36 loc) • 755 B
Markdown
## Example
```js
var sampleData = [
['All', null],
['North', 'North'],
['East', 'East'],
['South', 'South'],
['West', 'West'],
];
var chart = d3.select("#vis")
.style({
width: '500px',
height: '500px'
})
.append('div')
.style({
position: 'absolute',
top: '225px',
left: '125px',
width: '250px'
})
.chart('DomoSelect')
.c({
width: 250,
});
chart.draw(sampleData);
setTimeout(function () {
chart.button.trigger('dispatch:click', sampleData[0]);
}, 1000);
setTimeout(function () {
chart.dropdown.trigger('click', sampleData[1]);
}, 2000);
setTimeout(function () {
chart.button.trigger('dispatch:click', sampleData[0]);
}, 3000);
```