Change area fill color ?
Dhan3777 opened this issue · 1 comments
Dhan3777 commented
Instead of green and red. I want my area chart fill color to be blue and red. Can I do that ? or maybe just Single blue colour irrespective of direction
SlicedSilver commented
These short code samples show how to set the colors:
- https://tradingview.github.io/lightweight-charts/docs/series-types#area
- https://tradingview.github.io/lightweight-charts/docs/series-types#baseline
For example:
const areaSeries = chart.addAreaSeries({ lineColor: '#2962FF', topColor: '#2962FF', bottomColor: 'rgba(41, 98, 255, 0.28)' });
or
const baselineSeries = chart.addBaselineSeries({ baseValue: { type: 'price', price: 25 }, topLineColor: 'rgba( 38, 166, 154, 1)', topFillColor1: 'rgba( 38, 166, 154, 0.28)', topFillColor2: 'rgba( 38, 166, 154, 0.05)', bottomLineColor: 'rgba( 239, 83, 80, 1)', bottomFillColor1: 'rgba( 239, 83, 80, 0.05)', bottomFillColor2: 'rgba( 239, 83, 80, 0.28)' });