javascript - Change the date to UNIX timestamp in all stock quotes for highstock -



javascript - Change the date to UNIX timestamp in all stock quotes for highstock -

i want create graph of stock quotes (downloaded yahoo finance csv , changed json array), date in standard format(mm/dd/yyyy) highstocks works in unix timestamp (i guess). please give me whole code on how alter time's format. know date.parse() don't know how apply whole data. please help me code please

$(function() { $.getjson('http://www.highcharts.com/samples/data/jsonp.php?a=e&filename=aapl-ohlc.json&callback=?', function(data) { // create chart $('#container').highcharts('stockchart', { rangeselector: { inputenabled: $('#container').width() > 480, selected: 1 }, title: { text: 'aapl stock price' }, series: [{ type: 'candlestick', name: 'aapl stock price', data: [ // y: [open, high ,low, close] /* may 2006 */ [date.parse("8/2/2012"), 602.84, 610.69, 600.25, 607.79, 83039600], [date.parse("8/3/2012"), 613.63, 617.98, 611.56, 615.7, 86230200], [date.parse("8/6/2012"), 617.29, 624.87, 615.26, 622.55, 75525800], [date.parse("8/7/2012"), 622.77, 625, 618.04, 620.91, 72611700] ["8/7/2012", 622.77, 625, 618.04, 620.91, 72611700], ["8/6/2012", 617.29, 624.87, 615.26, 622.55, 75525800], ["8/3/2012", 613.63, 617.98, 611.56, 615.7, 86230200], ["8/2/2012", 602.84, 610.69, 600.25, 607.79, 83039600], ["8/1/2012", 615.91, 616.4, 603, 606.81, 96125400] ], datagrouping: { units: [ [ 'week', // unit name [1] // allowed multiples ], [ 'month', [1, 2, 3, 4, 6] ] ] } }] }); }); });

i'm inputting info manually,still don't know utilize of sample data

$.getjson('http://www.highcharts.com/samples/data/jsonp.php?a=e&filename=aapl-ohlc.json&callback=?', function (data) {

when info json, need utilize map dates timestamps, in preprocessing. utilize loop / status prepare new array series, including right values.

javascript highstock

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -