HighStock xAxis datetime formatting for 2 days stock data -


i have requirement needs show fixed xaxis 2 days stock data. datetime https://www.google.ca/finance?q=nasdaq:amd, datetime show 9:30am, 12:00pm, 2:00pm 2 days, no matter how many data points received.

the stock data receive dynamic, , need display data without spanning full width of chart, example, if last data point received @ 10:00am, need show chart locked in time frame, , if more data points received, chart fill in rest of space since xaxis should fixed , full range.

the stock data irregular interval. set "ordinal" = false, there big gap between days. if "ordinal" = true, i'm unable fixed xaxis datetime full range.

here code https://jsfiddle.net/aam3wxlk/4/ ` highcharts.setoptions({ global: { useutc: false } });

    highcharts.stockchart('container', {          yaxis: {             minortickwidth: 0         },          xaxis: {             type: 'datetime',             ordinal: true,             tickpositions:  [1504791000000, 1504800000000,      1504807200000, 1504877400000, 1504886400000, 1504893600000],             labels: {             formatter: function() {               return highcharts.dateformat('%d %b %h:%m', this.value);             }           }          },          series: [{             data: [             [1504791000000, null],                 [1504795800000, 0.76],     [1504797359000, 0.75],     [1504798140000, 0.74],     [1504798199000, 0.73],     [1504813680000, 0.72],     [1504881660000, 0.73],     [1504883340000, 0.74],     [1504887060000, 0.75]             ]          }]     }); 

` went through options of highstock , not sure how highstock configuration support case?


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -