<div id="container"></div>
html, body, #container {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
anychart.onDocumentReady(function () {
// create data for the first series
var data_1 = [
{x: 0.6, value: 22},
{x: 1.7, value: 55},
{x: 2.3, value: 50},
{x: 3.5, value: 80},
{x: 3.9, value: 74},
{x: 4, value: 68},
{x: 4, value: 76},
{x: 4.1, value: 84},
{x: 4.7, value: 93}
];
// create data for the second series
var data_2 = [
{x: 0.5, value: 17.5},
{x: 4.75, value: 100}
// create a chart
var chart = anychart.scatter();
// create the first series (marker) and set the data
var series1 = chart.marker(data_1);
// create the second series (line) and set the data
var series2 = chart.line(data_2);
// enable major grids
chart.xGrid(true);
chart.yGrid(true);
// enable minor grids
chart.xMinorGrid(true);
chart.yMinorGrid(true);
// set the chart title
chart.title("Scatter Plot: Basic Sample");
// set the container id
chart.container("container");
// initiate drawing the chart
chart.draw();
});