Highstock with numbers instead of date in x-axis

ε祈祈猫儿з 提交于 2019-12-30 06:35:22

问题


I need to output a plot on page, and I'm considering Highstock or Highcharts to implement this. Highstock interface is more preferable due to navigator pane showing the rest of plot after rezooming.

However my plot has numbers in x-asis, but not date/time. Is there any way to use Highstock with numerical x-scale? Or add similar navigator to Highcharts?


回答1:


Highstock's only type of xAxis is datetime, so using it with numbers is not an option. (Maybe if you make some tricky formatting actions and define a custom tooltip with the same formatting options it might be possible).

Leaves only Highcharts and there is an example called master-detail chart that could meet your requirements.

Hope that helps.




回答2:


Below X Axis formatter can be used with high Stock for displaying numbers in X-Axis:

xAxis: {labels: {   formatter: function () {return this.value;}} }



回答3:


xAxis: {
    type: 'linear' // Other types are "logarithmic", "datetime" and "category"
}, 


来源:https://stackoverflow.com/questions/9378693/highstock-with-numbers-instead-of-date-in-x-axis

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!