HTMLcopy
1
<div id="container"></div>
CSScopy
6
1
html, body, #container {
2
width: 100%;
3
height: 100%;
4
margin: 0;
5
padding: 0;
6
}
JavaScriptcopy
x
1
anychart.onDocumentReady(function () {
2
var chart = anychart.pareto();
3
chart.data([
4
{x: 'Nail polish', value: 14814},
5
{x: 'Eyebrow pencil', value: 13012},
6
{x: 'Rouge', value: 16624},
7
{x: 'Lipstick', value: 8814},
8
{x: 'Eyeshadows', value: 12998},
9
{x: 'Eyeliner', value: 17321},
10
{x: 'Foundation', value: 10342},
11
{x: 'Lip gloss', value: 22998},
12
{x: 'Mascara', value: 19261}
13
]);
14
15
// Get selected state
16
var state = chart.selected();
17
18
state.labels({enabled: true, fontColor: '#F44336'});
19
20
chart.title('Get and modify selected state');
21
chart.container('container');
22
chart.draw();
23
24
chart.getSeries(1).select([0, 2]);
25
});