You change the text to "Others" when the grouping is too small, which is good, but I need to translate this. How can i achieve this?
Set the following property to the text string you want (assuming this is for PieChart):chart.PieChart.OthersCategoryText = "your text";
Thanks that works good but i have one more problem. Sometimes I have 3 items in my pie chart, 2 items are rendered properly but the third one is below 1 % and instead of showing its name, it shows others, that is nonsense because there is only 1 item that is just renamed others.
Thanks, It works perfect.
When using composite charts, setting most properties directly on the chart control will have no effect.You have to set the properties on the chart layer, instead.
Dim appearance as New PieChartAppearance()appearance.OthersCategoryText = "MyText"appearance.OthersCategoryPercent = 0layer.ChartTypeAppearance = appearance
I used one of your sample code, make some testing with the property "OthersCategoryPercent" and set it to zero. Also, I used the property "OthersCategoryText" and set it to "Testing" but on the graph, I still see the "Other" shows for the legend.
My graph still showing "Other" within the legend and I don't know how to fix it. Would you give me some suggestions? Thanks
------------------------------------------------------------------
UltraChart1.ChartType = ChartType.Composite
Dim area As New ChartArea() UltraChart1.CompositeChart.ChartAreas.Add(area)
Dim series As New NumericSeries() series.Points.Add(New NumericDataPoint(1, "one", False)) series.Points.Add(New NumericDataPoint(2, "two", False)) series.Points.Add(New NumericDataPoint(3, "three", False)) series.Points.Add(New NumericDataPoint(4, "four", False)) series.Points.Add(New NumericDataPoint(99, "five", False)) UltraChart1.CompositeChart.Series.Add(series)
UltraChart1.PieChart.OthersCategoryText = "testing"
Dim layer As New ChartLayerAppearance() layer.ChartType = ChartType.PieChart layer.ChartArea = area layer.Series.Add(series) UltraChart1.CompositeChart.ChartLayers.Add(layer)
Dim legend As New CompositeLegend() legend.Bounds = New Rectangle(0, 0, 100, 100) legend.ChartLayers.Add(layer)
UltraChart1.CompositeChart.Legends.Add(legend)
There's a property called OthersCategoryPercent under PieChart, that is set to 3 by default. This means anything below 3% is grouped into Others, regardless of how many items fall into that category. You can change it to 0 to display everything without having "Others".