Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
630
Pie chart with more than 7 slices crashes...
posted

Hello again,

i have a pie chart with more than 7 slices and assigned a theme with my own color pallet. If i don't assign the theme it doesnt crashes.

 

Here is my sample

public IGPieChartThemeDefinition CreateThemePieChart10Colors()        

{            

IGPieChartThemeDefinition def = new IGPieChartThemeDefinition();            

def.Font = UIFont.FromName("Helvetica", 12);

def.FontColor = new IGBrush(0, 0, 0, 1);

def.LegendFont = UIFont.FromName("Helvetica", 12);

def.LegendFontColor = new IGBrush(0, 0, 0, 1);            

def.LegendBorderThickness = 1;            

def.LegendPalette = new IGChartPaletteItem();

def.LegendPalette.Color = new IGBrush(UIColor.White);

 

 

IGChartPaletteItem item1 = new IGChartPaletteItem

{                

Color = new IGBrush(24.0f / 255.0f, 116.0f / 205.0f, 1, 1),                

OutlineColor = new IGBrush(0, 0, 0, 1)            

};            

def.SlicePalettes.Add(item1);

 

IGChartPaletteItem item2 = new IGChartPaletteItem

{                

Color = new IGBrush(205.0f /255.0f, 102.0f / 255.0f, 0, 1),                

OutlineColor = new IGBrush(0, 0, 0, 1)            

};            

def.SlicePalettes.Add(item2);

.....

.....

IGChartPaletteItem item10 = new IGChartPaletteItem            

{                

Color = new IGBrush(205.0f / 255.0f, 0, 0, 1),                

OutlineColor = new IGBrush(0, 0, 0, 1)            

};            

def.SlicePalettes.Add(item10);

return def;

}

 

....

PieChart = new IGPieChartView;

....

PieChart.Theme = CreateThemePieChart10Colors():

 

Did i forget something in the theme definition? It also crashed if i define only 5 items or using predefined colors from UIColor-enum.

 

Thanks,

Johann