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
3
// defining chart type
4
var chart = anychart.column();
5
6
// title setter
7
chart.title("Linear Scale Sample");
8
9
// setting yScale type as liner. Even knowing it's liner by default
10
chart.xScale(anychart.scales.dateTime());
11
12
// y axis title setter
13
var yAxis = chart.yAxis();
14
yAxis.title("This Axis Has 'Linear' Type");
15
16
// setting data
17
var series = chart.stick([
18
{
19
"x": 1680825600000,
20
"value": 15.38
21
},
22
{
23
"x": 1680998400000,
24
"value": 15.24
25
},
26
{
27
"x": 1682380800000,
28
"value": 13.96
29
},
30
{
31
"x": 1682812800000,
32
"value": 16.32
33
},
34
{
35
"x": 1683676800000,
36
"value": 15.24
37
},
38
{
39
"x": 1684540800000,
40
"value": 12.51
41
},
42
{
43
"x": 1685145600000,
44
"value": 16.12
45
},
46
{
47
"x": 1685318400000,
48
"value": 14.93
49
},
50
{
51
"x": 1685664000000,
52
"value": 14.22
53
},
54
{
55
"x": 1685923200000,
56
"value": 14.07
57
},
58
{
59
"x": 1686355200000,
60
"value": 13.76
61
},
62
{
63
"x": 1686441600000,
64
"value": 13.56
65
},
66
]);
67
series.tooltip(false);
68
69
70
chart.container("container");
71
chart.draw();
72
});