-
Notifications
You must be signed in to change notification settings - Fork 775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Legend series colors wrong when pointColorMapper used #114
Comments
Hi @jfox454 , Greetings from Syncfusion. We have analyzed your scenario at our end. As of now, the default behavior in cartesian chart is when the point color mapper is used, it doesn’t change the legend color. The circular and triangular chart only have that kind of feature. Can you provide us more information on what type of chart widget are you using? So, that we can provide a solution for your requirement at earlier. Thanks, Sriram Kiran |
Hi @SriramKiranSenthilkumar , |
Hi @jfox454 , As of now, in the cartesian chart widget, the legend colour can't be changed according to the point colour mapper values, since the legend is created for the series only and not for the individual data points of that series. So, this is the default behaviour of the legend in the cartesian chart widget. Thanks, |
Are there any plans to update this behaviour so that the legend color is set by the point color mapper for a cartesian chart? My preference would be to use the point color mapper rather than having to adjust the color palette for each chart. |
Hi @jfox454 , No, the legend colour in the cartesian chart is currently set according to the series colour palette prescribed in the chart. This is the default behaviour of the legend as mentioned earlier. It cannot be changed according to the point colour mapper values of the data points because for every individual series in the chart, a single legend is created. For example, we have created a simple sample and provided the screenshot below to explain the behaviour. We have provided two series in the chart in which one series has point colour mapper values mapped for the data points and another series with no pointColorMapper values mapped and with legend enabled for both the series. You can see that for each series in the chart one legend is created. So, it is not possible to map the point colour for the series legend which has point colour mapper mapped to individual data points. Screenshot: The sample for reference can be found below You can customize the legend colour for each series individually using the onLegendItemRender event available in the chart. Please refer the below code snippet to achieve it.
For further reference on onLegendItemRender event, please check the user guide below Thanks, |
When the pointColorMapper is used to change the color of a series, the Legend color is not updated and still appears to use the Color Palette colors.
The text was updated successfully, but these errors were encountered: