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.scatter([
3
{x: 1, value: 6},
4
{x: 1, value: 10},
5
{x: 2, value: 18},
6
{x: 3, value: 11},
7
{x: 3.1, value: 10},
8
{x: 3.1, value: 12},
9
{x: 4, value: 9},
10
{x: 2, value: 5},
11
{x: 4.5, value: 7},
12
{x: 2.1, value: 8}
13
]);
14
15
chart.xAxis(0, {orientation: 'top', title: null});
16
chart.xAxis(1, {orientation: 'bottom', title: 'X-Axis'});
17
chart.xAxis(2, {orientation: 'right', title: null});
18
19
// Disables X-axis by index.
20
chart.xAxis(1, false);
21
22
chart.title('Disable X-axis by index');
23
chart.container('container');
24
chart.draw();
25
});