How do you change the colors of the slices in the UltraDoughnutChart?
Thanks,
Helena
Hello Helena,
There is a possibility of assigning different colors to the slices of UltraDoughnutChart by using the Brushes property off the RingSeries class. The Brushes property defines the palette from which automatically assigned slice brushes are selected. The colors will be applied to the slices in the order the brushes were added. For example, you can do something like this:
BrushCollection bc = new BrushCollection();bc.Add(new SolidColorBrush(Colors.Red));bc.Add(new SolidColorBrush(Colors.Green));bc.Add(new SolidColorBrush(Colors.Blue));bc.Add(new SolidColorBrush(Colors.Pink));bc.Add(new SolidColorBrush(Colors.Brown)); doughnutChart.RingSeries.Brushes = bc;
Please let me know if I may be of further assistance.
Sincerely,Sahaja KokkalagaddaAssociate Software Developer
Thank you! That worked!
Is there a way to associate the color with a particular slice?
In a UltraDoughnutChart, there are no properties or events for applying a particular brush color based on a data item.
After investigating applying particular brush color based on the data item and doing some research, this has been determined to be a product idea. You can suggest new product ideas for future versions (or vote for existing ones) at <http://ideas.infragistics.com>.Submitting your idea will allow you to communicate directly with our product management team, track the progress of your idea at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.Remember when submitting your idea to explain the context in which a feature would be used and why it is needed as well as anything that would prevent you from accomplishing this today. You can even add screenshots to build a stronger case. Remember that for your suggestion to be successful, you need other members of the community to vote for it. You can also link back to this thread for additional details.
Thank you in advance to submitting your product idea.
Do you know if there's a way to reset the labels on the UltraDoughnutChart? My chart is updated every minute and when it is updated, the new series contains the old labels and the new labels. I've tried removing the series from the chart, resetting the series, resetting the text, etc. and none of them work. My code is pretty basic:
RingSeries ringSeries = new RingSeries { DataSource = chartData, LabelMemberPath = "Label", ValueMemberPath = "Counter" };
ultraDoughnutChart1.Series.Add(ringSeries); ultraDoughnutChart1.Dock = DockStyle.Fill;
Thanks!
Hi Helena,
Please elaborate on the details of what you meant when you said Chart is updated every minute. Did removing the old series help in removing the old labels? You should remove the old series and update the Chart DataSource in order to show only the new series labels.
Let me know if I may be of further assistance.