Create highcharts chart using AJAX/JSON -
i building website uses highcharts library display single line series chart. using ajax retrieve historical financial data yahoo finance using yql.
the ajax call working correctly , can view returned data in console example
console.log( data.query.results.quote[0].close );
returns closing price value 457.84
how build single line series chart using data?
i cannot find simple explanation anywhere of how create chart using ajax data.
thanks
edit: fetching data in ajax , works correctly trying make chart work json im having difficulties.
this code looks like: http://jsfiddle.net/jbgvx/
this demo code off highstocks website: http://jsfiddle.net/xdhkz/
i think problem date formatting of ajax request. date being returned 2013-02-25 chart wants js timestamps. there way can extract date ajax, convert using date.utc , make chart using converted data?
if considering stock data, consider using highstocks instead of highcharts. can handle many data points faster highcharts able to.
highstocks has example pull in ajax data (1.6 million points) asynchronously here: http://www.highcharts.com/stock/demo/lazy-loading
Comments
Post a Comment