Set column chart color (single series)

Hi!

How to set the column colors in Blazor? I have a single series column chart and I'd like to have each column a different color (the color strings are stored in a list).
In React this could be done by a pointRenderer method but in Blazor I did not find anything similar.

Thanks.

3 Replies

DG Durga Gopalakrishnan Syncfusion Team June 1, 2020 12:41 PM UTC

Hi Kristof, 
 
Greetings from Syncfusion. 
 
We have analyzed your query. Currently, we don’t have support PointRender event in blazor. Meanwhile, we suggest you to use PointColorMapping property to assign colors for each point in a series. We have prepared sample for your reference. Please check with below code snippet and sample. 
 
Code Snippet 
 
<SfChart> 
  <ChartSeriesCollection> 
     <ChartSeries PointColorMapping="color"></ChartSeries> 
  </ChartSeriesCollection> 
</SfChart> 
 
 
Screenshot 
 
Sample 
 
Kindly revert us, if you have any concerns. 
 
Regards, 
Durga G 



KR Kristof June 2, 2020 07:47 AM UTC

Thanks. Exactly what I wanted! I think this should be included in the documentation.


DG Durga Gopalakrishnan Syncfusion Team June 3, 2020 01:13 PM UTC

Hi Kristof, 
 
Most welcome. We have documented PointColorMapping property usage in both cartesian charts and accumulation charts. Please check with the below UG links for more information. 

UG Links 
 
Please revert us, if you have any concerns. 
 
Regards, 
Durga G 


Loader.
Up arrow icon