private MapColorizer CreateColorizer() { KeyValueColorizer colorizer = new KeyValueColorizer(); colorizer.AddItem("color1", new ColorizerColorTextItem() { Color = Color.Coral, Text = "Category A" }); colorizer.AddItem("color2", new ColorizerColorTextItem() { Color = Color.Orange, Text = "Category B" }); colorizer.AddItem("color3", new ColorizerColorTextItem() { Color = Color.LightBlue, Text = "Category C" }); colorizer.ColorItemKeyProvider = new PieSegmentAttributeToColorKeyProvider() { AttributeName = "color" }; return(colorizer); }
private MapColorizer CreateColorizer() { KeyValueColorizer colorizer = new KeyValueColorizer() { ColorItemKeyProvider = new ChartItemArgumentToColorKeyProvider() }; colorizer.AddItem("A", new ColorizerColorTextItem(Color.Coral, "Argument A")); colorizer.AddItem("B", new ColorizerColorTextItem(Color.Orange, "Argument B")); colorizer.AddItem("C", new ColorizerColorTextItem(Color.LightBlue, "Argument C")); return(colorizer); }
private MapColorizer CreateColorizer() { KeyValueColorizer colorizer = new KeyValueColorizer(); colorizer.AddItem("color1", new ColorizerColorTextItem() { Color = Color.Coral, Text = "Coral" }); colorizer.AddItem("color2", new ColorizerColorTextItem() { Color = Color.Orange, Text = "Orange" }); colorizer.AddItem("color3", new ColorizerColorTextItem() { Color = Color.LightBlue, Text = "Light Blue" }); colorizer.ColorItemKeyProvider = new ShapeAttributeToColorKeyProvider() { AttributeName = "color" }; return(colorizer); }