Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- anychart.onDocumentReady(function() {
- // data
- var data = [
- { x: "janvier", value: 100 },
- { x: "Fevrier", value: 200 },
- { x: "Mars", value: 15 },
- { x: "Avril", value: 130 },
- { x: "Mai", value: 153 },
- { x: "Juin", value: 120 },
- { x: "Juillet", value: 151 },
- { x: "Aout", value: 58 },
- { x: "Septembre", value: 19 },
- { x: "Octobre", value: 135 },
- { x: "Novembre", value: 170 },
- { x: "Decembre", value: 195 },
- ];
- // create a chart
- chart = anychart.column();
- // set the interactivity mode
- chart.interactivity("by-x");
- // create a stick series and set the data
- var series = chart.stick(data);
- // set the chart title
- chart.title("Stick Chart: Basic Sample");
- // set the titles of the axes
- var xAxis = chart.xAxis();
- xAxis.title("Month");
- var yAxis = chart.yAxis();
- yAxis.title("Sales, $");
- // set the container id
- chart.container("container");
- // initiate drawing the chart
- chart.draw();
- });
Add Comment
Please, Sign In to add comment