问题
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