Highstock Issue - Can't draw and plot chart correctly -


i'm working on project display stock information using highstock.

question 1:

i tried display ohlc data using ohlc graph, high , low using areasplinerange graph, , volume using column chart.

everything works fine, if zoom 1m, 3m, 6m, ytd, , 1y. here snapshot. link1. if zoom all, graph messed link2.

am wrong in coding or it's bug?

question 2:

in same chart, have code change type of graph ohlc line. works fine when zoom 1m, 3m. here snapshot link3. show me no line chart when zoom 6m, 1y, , all. here snapshot link4.

how can happen?

thank help.

the code: here code used display chart

$.getjson(url, function (data1) {     $.getjson(urlprediction, function (data2) {         var ohlc = [],             volume = [],             closed = [],             forecast = [],             datalength1 = data1.length;             datalength2 = data2.length;          (i = 0; < datalength1; i++) {             ohlc.push([                 data1[i][0], // date                 data1[i][1], // open                 data1[i][2], // high                 data1[i][3], // low                 data1[i][4] // close             ]);              closed.push([                 data1[i][0], // date                 data1[i][4] // close             ]);              volume.push([                 data1[i][0], // date                 data1[i][5] // volume             ])         }          (i = 0; < datalength2; i++) {                      forecast.push([                 data1[i][0], // date                 data1[i][1],                 data1[i][2], // close             ])         }          // set allowed units data grouping         var groupingunits = [[             'week',                         // unit name             [1]                             // allowed multiples         ], [             'month',             [1, 2, 3, 4, 6]         ]];          $('#container').highcharts('stockchart', {                  rangeselector: {                     selected: 1                 },                 title: {                     text: title                 },                   yaxis: [{                     title: {                         text: 'ohlc'                     },                     height: 360,                     linewidth: 2                 }, {                     title: {                         text: 'volume'                     },                     top: 433,                     height: 100,                     offset: 0,                     linewidth: 2                 }],                 series: [{                     type: 'ohlc',                     name: stockname,                     data: ohlc,                 }, {                     type: 'areasplinerange',                     name: stockname,                     data: data2,                 }, {                     type: 'column',                     name: 'volume',                     data: volume,                     yaxis: 1,                 }]         });     }); }); 


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -