Highchart / Highstock 如何设置个别 ohlc 或蜡烛的颜色?
Highchart / Highstock how to set color of individual ohlc or candle?
我设置了一个highstock ohlc with angular 2. But can not set the up and down color for OHLC chart type, for example, green when hclose is increasing and red when it is decreasing. is there any API reference for that or any way to implement? like this below image I want my chart to look like..
我找到了这样的方法及其工作方式:-)
plotOptions: {
ohlc: {
color: 'red',
upColor: 'green'
}
},
series : [{
type: 'ohlc',
name : 'Stock Price',
data : [],
yAxis : 0,
}, {
type: 'column',
name : 'volume',
data : [],
yAxis : 1,
}]
您也可以使用这些来更改下行和上行的颜色。
plotOptions: {
candlestick: {
color: 'red',
upColor: 'green'
lineColor: 'red',
upLineColor: 'green'
}
}
我设置了一个highstock ohlc with angular 2. But can not set the up and down color for OHLC chart type, for example, green when hclose is increasing and red when it is decreasing. is there any API reference for that or any way to implement? like this below image I want my chart to look like..
我找到了这样的方法及其工作方式:-)
plotOptions: {
ohlc: {
color: 'red',
upColor: 'green'
}
},
series : [{
type: 'ohlc',
name : 'Stock Price',
data : [],
yAxis : 0,
}, {
type: 'column',
name : 'volume',
data : [],
yAxis : 1,
}]
您也可以使用这些来更改下行和上行的颜色。
plotOptions: {
candlestick: {
color: 'red',
upColor: 'green'
lineColor: 'red',
upLineColor: 'green'
}
}