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
4
var series = chart.line([
5
{x: "Point 1", value: 20},
6
{x: "Point 2", value: 25},
7
{x: "Point 3", value: 12},
8
{x: "Point 4", value: 20}
9
]);
10
11
// Set series vertical direction.
12
series.isVertical(true);
13
// Editing series does not involve axis orientation changing.
14
// Axes should be modified independently or with the anychart.VerticalArea and anychart.VerticalLine constructors.
15
16
chart.xAxis({orientation: "left"});
17
chart.yAxis({orientation: "bottom"});
18
chart.title("Set vertical direction for the series");
19
chart.container("container");
20
chart.draw();
21
});