HTMLcopy
1
<div id="container"></div>
CSScopy
8
1
html,
2
body,
3
#container {
4
width: 100%;
5
height: 100%;
6
margin: 0;
7
padding: 0;
8
}
JavaScriptcopy
x
1
anychart.onDocumentReady(function () {
2
// The data used in this sample can be obtained from the CDN
3
// https://cdn.anychart.com/samples/box-chart/box-and-whisker-chart/data.json
4
anychart.data.loadJsonFile(
5
'https://cdn.anychart.com/samples/box-chart/box-and-whisker-chart/data.json',
6
function (data) {
7
// create box chart
8
var chart = anychart.box();
9
10
// set chart title text settings
11
chart.title('Top 10 Jobs Salaries Grades Per Year Calisota, USA');
12
13
// set axes settings
14
chart.xAxis().staggerMode(true);
15
16
// create box chart series
17
var series = chart.box(data);
18
series.whiskerWidth('20%');
19
20
// set container id for the chart
21
chart.container('container');
22
23
// initiate chart drawing
24
chart.draw();
25
}
26
);
27
});