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.line([
3
{x: 'Theatre', value: 10},
4
{x: 'Literature', value: 4},
5
{x: 'Cinema', value: 17},
6
{x: 'Music', value: 20},
7
{x: 'Sculpture', value: 16},
8
{x: 'Art', value: 35},
9
{x: 'Painting', value: 6}
10
]);
11
12
// Set animation settings.
13
chart.animation({enabled: true, duration: 3000});
14
15
chart.title('Set chart animation parameters as an object');
16
chart.container('container');
17
chart.draw();
18
});