Candle Stick Open and Close color fill

Hi team, 

Is there a way to customize the color fill of the candle stick so that it reflects the opening and closing price of the candle and doesn't look at the previous candle close? 

As I noticed, the color fill (bear or bull) does not look at the opening and close of the individual candle, but rather the close of the of previous candle. I want to customize this option for my current implementation, would that be possible?


1 Reply

YG Yuvaraj Gajaraj Syncfusion Team December 9, 2021 04:17 PM UTC

Hi Meshari, 
 
Greetings from Syncfusion. We have analyzed your query and we would like to let you know that in our chart we have a pointColorMapper property in the series. Using this, we can map the color from data source to individual point. Here, based on the previous point we have applied red and green, you can change this based on your scenario. Find the code snippet below to accomplish this. 
 
Code snippet:  
pointColorMapper: (ChartData data, index) => 
                    (index > 0 && data.open! > chartData[index - 1].close!) 
                        ? Colors.red 
                        : Colors.green, 
 
 
We have also attached the sample below for your reference. 
 
  
Regards, 
Yuvaraj. 


Loader.
Up arrow icon