在HighCharts中更改音量列的颜色(高/低) [英] Change Color of Volume Columns (High/Low) in HighCharts

查看:97
本文介绍了在HighCharts中更改音量列的颜色(高/低)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的图表,显示烛台下方的卷列: http://jsfiddle.net/T83Xy/

p>

基本上,我想使用黑色和红色作为列,具体取决于它是否高于open或open。我通过按Y:data,color:'#000000'作为参数看过一些样本。问题是我在推送日期和卷号。我试图推X:date,Y:data,color:'#000000',但它抛出错误,并且没有给我预期的结果。 首先,如果您需要将 series.turboThreshold 设置为Number.MAX_VALUE有很多积分。

然后看看我的例子 - 我认为这是清楚和有益的。只要我们有数据分组,我们需要实施一个小小的黑客来重新审视每个点的状态。
http://jsfiddle.net/T83Xy/9/


I've got a simple chart showing candlesticks with volume columns underneath: http://jsfiddle.net/T83Xy/

Basically, I want to use black and red for the columns depending on whether it closes higher than the open or not. I've seen some samples by pushing Y: data, color: '#000000' as the parameter. The problem is I'm pushing a date and a volume number. I attempted to push X: date, Y: data, color: '#000000' but it's throwing errors and not giving me the expected result.

解决方案

At first, you need to set series.turboThreshold to Number.MAX_VALUE if you have a big amount of points.

Then take a look at my example - I think it's clear and helpful. As soon as we have dataGrouping on series, we need to implement a tiny hack to reassing every point's states. http://jsfiddle.net/T83Xy/9/

这篇关于在HighCharts中更改音量列的颜色(高/低)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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