Javascript examples for highcharts:Line Chart
displaying ever other point on a line chart
<html> <head> <title>Highcharts Demo</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <script type="text/javascript"> $(function () {// w w w . j ava 2s. co m var someData = [[0,29.9], [1,71.5],[2, 106.4], [3,129.2], [4,144.0], [5,176.0], [6,135.6],[7, 148.5], [8,216.4], [9,194.1], [10,95.6], [11,54.4]]; $('#container').highcharts({ chart: { }, xAxis: { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] }, series: [{ data: $.map(someData, function(i,j){ return { x: i[0], y: i[1], marker: { enabled: j % 2 == 0 } }; }) }] }); }); </script> </head> <body> <script src="https://code.highcharts.com/highcharts.js"></script> <div id="container" style="height: 400px"></div> </body> </html>