javascript - HighchartHighstock how to set color of individual ohlc or candle? - Stack Overflow

I have set up a highstock ohlc with angular 2. But can not set the up and down color for OHLC chart typ

I have set up a 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..

I have set up a 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..

Share Improve this question edited Aug 1, 2017 at 7:15 Daniel 3,5143 gold badges36 silver badges47 bronze badges asked Aug 1, 2017 at 6:03 Subhabrata BanerjeeSubhabrata Banerjee 5521 gold badge4 silver badges19 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 7

I found a way like this and its working :-)

plotOptions: {
    ohlc: {
        color: 'red',
        upColor: 'green'
     }
},
series : [{   
    type: 'ohlc',                 
    name : 'Stock Price', 
    data : [],
    yAxis : 0,                            
}, {   
    type: 'column',                 
    name : 'volume', 
    data : [],
    yAxis : 1,                        
}]

You can use these to change the colors for down line and up line colors as well.

plotOptions: {
    candlestick: {
        color: 'red',
        upColor: 'green'
        lineColor: 'red',
        upLineColor: 'green'
    }
}

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745387110a4625487.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信