angle - How to illustrate angular data series in highcharts? -


i have data set series values angles in degrees (0 360). possible plot graph 1 illustrated here (ignore green vertical line) in highcharts? specifically, if of following criteria holds, chart should avoid linking 2 data points directly in sense of passing through south (180), , should pass through north (0/360) instead:

  1. a point below 90 , next 1 above 270, or;
  2. a point above 270 , next 1 below 90.

any appreciated.

what make happen pre-process data create 2 series , plot both of them onto same plot. 1 series 0-179 , other 180-359.

you may want consider scatter plot instead of line plot if data in either of series not smooth data in example. meaning 1 data point 10 , next 1 110 , next 1 after 12 or such.

this code gives example, data provided json should able replace data comes in:

<script type="text/javascript"> $(document).ready(function () {     var chart = new highcharts.chart({         title: {             text: 'wind direction'         },         chart: {             renderto: 'dataplot4',             borderwidth: 1,             defaultseriestype: 'scatter',             zoomtype: 'x'         },         legend: {             enabled: false         },         plotoptions: {             series: {                 marker: {                     radius: 3,                     states: {                         hover: {                             enabled: true                         }                     }                 }             }         },         xaxis: {             type: 'datetime'         },         yaxis: {             tickinterval: 90,             min: 0,             max: 360,             title: {                 text: 'wind direction (deg)'             }         },         tooltip: {             crosshairs: true,             formatter: function () {                 return '<b>' + highcharts.dateformat('%e. %b %y, %h:00', this.x) + ' akst</b> ' +                         this.series.name + ': ' + this.y + ' deg';             }         },         series: [             {                 name: 'wind direction',                 data: json.parse("[" + wind_dir + "]"),                 pointstart: number(startdatetime),                 pointinterval: 3600000             }         ]     }); }); </script> 

i'd think have jsfiddle somewhere, update answer when dig up.

edit: here's fiddle shows scatter plot in action. http://jsfiddle.net/reality_extractor/pnfyl/


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -