How to make the color in bar chart of Highstock look like in candlestick chart?

有些话、适合烂在心里 提交于 2019-12-25 09:54:07

问题


Can volume chart's color same as the candlestick's color above?

I tried give a color list in series with the

colors: ['red', 'red', 'green', ...]

colorByPoint: true

Highstock source code:

init: function (series, options, x) {

var point = this,
    colors;
point.series = series;
point.color = series.color; // #3445
point.applyOptions(options, x);
point.pointAttr = {};

if (series.options.colorByPoint) {
    colors = series.options.colors || series.chart.options.colors;
    point.color = point.color || colors[series.colorCounter++];
    // loop back to zero
    if (series.colorCounter === colors.length) {
        series.colorCounter = 0;
    }
}

series.chart.pointCount++;
return point;

}

But it did not work, because not all the points in the current screen at the same time, but the volume chart's color list is.

I did this all night,Can somebody help me?

来源:https://stackoverflow.com/questions/37091286/how-to-make-the-color-in-bar-chart-of-highstock-look-like-in-candlestick-chart

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