格式Highcharts xAxis用于股票数据 [英] Format Highcharts xAxis for stock data

查看:163
本文介绍了格式Highcharts xAxis用于股票数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经经历了Highcharts选项,需要为xAxis属性设置格式时间标签,但没有运气理解这是如何工作的这种情况下。



在白天(日内)检索的股票的动态数据,我需要显示为数据,从9:30开始,每天结束于17:00我需要显示标签显示30分钟间隔如下:9 :30..10:00..10:30..etc但我似乎无法使用每5分钟接收到的数据块(指针)。



另一个问题是,我需要显示数据,而不是跨越到图表的全宽,例如在10:00,我有6个酒吧(每个5分钟),但它的作用是它填充图表与大6 bar,而不是将它们锁定到时间框架:



我需要做的是在9:30-10:00区域内显示这些栏,并留下其余的填充,因为我收到更多的数据,像这样:

我会感谢任何帮助,如何完成这项工作。我知道股票图表类型是在工作,但我需要立即使用OHLC类型。



非常感谢。



但是对于highcharts(如果这个是你的想法)是你使用的东西)可以做的步骤。这反过来,只显示标签每x个间隔。



我已经创建了如何处理您的项目的演示。

  // 

http://jsfiddle.net/BAV4X/69/

  // 

与它的几个问题,但一开始,这不是传统的开始/结束而是高/低,高的差异计算,你可以看到当工具提示创建和相应的值。



请记住,你不需要使用



EDIT



显然,您可以设置x轴属性MAX以允许图表的完整视图,而不是缩放。



这是相当混乱,因为他们有一个pointStart来表示开始的x轴,但没有pointEnd。


I have gone through Highcharts options needed to be set for xAxis properties to format time label but with no luck understanding how exactly this works for this scenario.

I have dynamic data retrieved for a stock during the day (intraday) which I need to display as data is retrieved starting at 9:30 and ending at 17:00 every day, I need to display labels showing 30 minutes interval as in the following: 9:30..10:00..10:30..etc but I can't seem to get this working with data blocks (pointers) received every 5 minutes.

The other problem is that I need to display data without spanning to the full width of the chart, for example at 10:00 all I have is 6 bars (5 minutes each) but what it does is that it fills the chart with large 6 bars instead of locking them to their time frame:

What I need to do is to display these bars within the 9:30-10:00 area and leave the rest to be filled as I receive more data just like this: I would appreciate any help on how to get this done. I know a Stock chart type is in the work, but I need to use the OHLC type for now urgently.

Many thanks.

解决方案

Not sure if this is the type of thing your thinking of.

But with highcharts (If this is the thing your using) can do steps. Which in turn, only show the label every x intervals.

I have created a demo of how you may approach your project.

//

http://jsfiddle.net/BAV4X/69/

//

Couple issues with it, but somthing to start with, This isnt traditional "start / end" day values, rather "high/low" , high is calculated by the difference , you can see when the tooltip is created and the corresponding values.

Keep in mind you dont need to use "categories" but instead [x,y] co-ordinates in the data series.

EDIT:

Apparently you can set the x-axis property "MAX" to allow full view of the chart, rather than it scaling.

This is fairly confusing as they have a "pointStart" to indicate the beginning x-axis, but no "pointEnd".

这篇关于格式Highcharts xAxis用于股票数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆