Guest User

Untitled

a guest
Oct 18th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. anychart.onDocumentReady(function() {
  2. // data
  3. var data = [
  4. { x: "janvier", value: 100 },
  5. { x: "Fevrier", value: 200 },
  6. { x: "Mars", value: 15 },
  7. { x: "Avril", value: 130 },
  8. { x: "Mai", value: 153 },
  9. { x: "Juin", value: 120 },
  10. { x: "Juillet", value: 151 },
  11. { x: "Aout", value: 58 },
  12. { x: "Septembre", value: 19 },
  13. { x: "Octobre", value: 135 },
  14. { x: "Novembre", value: 170 },
  15. { x: "Decembre", value: 195 },
  16. ];
  17.  
  18. // create a chart
  19. chart = anychart.column();
  20.  
  21. // set the interactivity mode
  22. chart.interactivity("by-x");
  23.  
  24. // create a stick series and set the data
  25. var series = chart.stick(data);
  26.  
  27. // set the chart title
  28. chart.title("Stick Chart: Basic Sample");
  29.  
  30. // set the titles of the axes
  31. var xAxis = chart.xAxis();
  32. xAxis.title("Month");
  33. var yAxis = chart.yAxis();
  34. yAxis.title("Sales, $");
  35.  
  36. // set the container id
  37. chart.container("container");
  38.  
  39. // initiate drawing the chart
  40. chart.draw();
  41. });
Add Comment
Please, Sign In to add comment