Note that there are some explanatory texts on larger screens.

plurals
  1. POuse multiple json calls for drawing multiple lines on highcharts php
    text
    copied!<p>I'm pulling my hairs since hours...to create multiple lines highstocks by calling php script generating the JSON data</p> <p>I've a php/javascript file that downloads JSON data containing 2 series. <a href="http://nas.parvais.com/domotique/sonde_exp_json.php?sonde_id=24&amp;callback=a" rel="nofollow">look here</a> </p> <p>Then, in my <a href="http://nas.parvais.com/domotique/chart_sonde.php?sonde_id=23" rel="nofollow">php file creating the highchart</a>, I've the following code to display graph of a probe ($sonde_id): <a href="http://jsfiddle.net/tparvais/bYPQc/" rel="nofollow">see fiddle</a>: the first serie "average" is with the average value, the second is a range with min/max. I can scroll over the time/zoom etc... the refresh works. This is very slow for another known problem, but it works.</p> <p>Now my problem us that I'd like to display multiple lines from different probes ($sonde_id).</p> <p>I tried the following code for charting probe 23,22 &amp; 24; by simply multiplying the json.get but that does not work </p> <pre><code> var url = 'sonde_exp_json.php?sonde_id=23&amp;callback=?' ; $.getJSON(url, function (json_data_23) { console.log (json_data_23.average); options.series[0].data=json_data_23.average; }); //end getJSON url = 'sonde_exp_json.php?sonde_id=22&amp;callback=?' ; $.getJSON(url, function (json_data_22) { options.series[1].data = json_data_22.average; }); //end getJSON url = 'sonde_exp_json.php?sonde_id=24&amp;callback=?' ; $.getJSON(url, function (json_data_24) { options.navigator.series = json_data_24.average; options.series[2].data = json_data_24.average; }); //end getJSON </code></pre> <p>error is "ncaught SyntaxError: Unexpected identifier " after the line options.series[0].data.=json_data_23.average;</p> <p>I don't understand the problem. I'm totally lost with these objects/arrays/json and structure to display multiple lines on same charts. I read many others answers, but I miss something</p> <p>Thank you</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload