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
anychart.data.loadJsonFile(
3
"https://gist.githubusercontent.com/shacheeswadia/dceaadd5fb4ea27cd9975ff39e9f98f4/raw/6baac571527d9b13e397cfb3d982d7942246dcc0/scatterPlotData.json",
4
function (data) {
5
6
// create a scatter chart
7
let chart = anychart.scatter();
8
9
// create and configure markers
10
let marker = chart.marker(data);
11
marker.type("circle").size(2);
12
13
// set the titles of the axes
14
chart.yAxis().title("International sales ($ in millions)");
15
chart.xAxis().title("Domestic sales ($ in millions)");
16
17
// set the title of the chart
18
chart.title(
19
"Top 1000 Highest Grossing Hollywood Movies: Domestic vs. International Sales"
20
);
21
22
// set the container id for the chart
23
chart.container("container");
24
25
// initiate drawing the chart
26
chart.draw();
27
28
}
29
);
30
});