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 stage = anychart.graphics.create("container");
3
4
var firstChart = anychart.marker();
5
firstChart.marker([10, 4, 17, 20]);
6
firstChart.marker([5, 16, 10, 3]);
7
firstChart.marker([25, 4, 28, 11]);
8
9
firstChart.bounds(0, 0, "50%", "100%");
10
firstChart.markerPalette(["diamond", "line", "circle"]);
11
firstChart.container(stage);
12
firstChart.draw();
13
14
var secondChart = anychart.marker();
15
secondChart.marker([5, 40, 6, 37]);
16
secondChart.marker([7, 23, 9, 18]);
17
secondChart.marker([11, 17, 12, 34]);
18
19
secondChart.bounds("50%", 0, "50%", "100%");
20
21
// Gets marker palette of the first chart.
22
var firstChartMarkerPalette = firstChart.markerPalette();
23
24
secondChart.markerPalette(firstChartMarkerPalette);
25
secondChart.container(stage);
26
secondChart.draw();
27
28
var title = anychart.standalones.title();
29
title.text("Get and use marker palette.");
30
title.container(stage);
31
title.draw();
32
});