Highchart / Highstock how to set color of individual ohlc or candle?

白昼怎懂夜的黑 提交于 2021-01-04 05:50:13

问题


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..


回答1:


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,                        
}]


来源:https://stackoverflow.com/questions/45430030/highchart-highstock-how-to-set-color-of-individual-ohlc-or-candle

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