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..
Asked
Active
Viewed 1,247 times
3

Daniel
- 3,541
- 3
- 33
- 46

Subhabrata Banerjee
- 442
- 1
- 4
- 18
2 Answers
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,
}]

Subhabrata Banerjee
- 442
- 1
- 4
- 18
-
The upColor property should have 'green' value and color should be 'red'. I prepared a demo for you: http://jsfiddle.net/6orvqbLn/. – pawel_d Aug 01 '17 at 18:40
-
oops..I misplaced the color. Yes green should be the up color.. thnx :) – Subhabrata Banerjee Aug 02 '17 at 07:00
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'
}
}

Ubaid
- 737
- 8
- 18