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 dataSet = anychart.data.set([
3
[1, 22, 13],
4
[2, 22, 23],
5
[3, 22, 33],
6
[4, 22, 43]
7
]);
8
9
var mapping = dataSet.mapAs({x: 0, value: 2});
10
11
// Set value by the row index.
12
mapping.row(1, [5, 44, 100]);
13
14
var chart = anychart.pie();
15
chart.data(mapping);
16
chart.title('Set value by the row index');
17
chart.container('container');
18
chart.draw();
19
});