Hi there!
Is there any way to change the legend's shape from line to square or any other shapes that is available?
Thanks in advance!
Chris
Hello Chris,
Maybe one possible approach to achieve desired behavior could be if you are using for example:
myLegend = new CompositeLegend(); myLegend.ChartLayers.Add(myColumnLayer); myLegend.ChartLayers.Add(myColumnLayer2); myLegend.ChartLayers.Add(myColumnLayer3); myLegend.ChartLayers[1].LegendItem = LegendItemType.Auto; myLegend.Bounds = new Rectangle(0, 85, 15, 15); myLegend.BoundsMeasureType = MeasureType.Percentage; myLegend.PE.ElementType = PaintElementType.Gradient; myLegend.PE.FillGradientStyle = GradientStyle.ForwardDiagonal; myLegend.PE.Fill = Color.CornflowerBlue; myLegend.PE.FillStopColor = Color.Transparent; myLegend.Border.CornerRadius = 10; myLegend.Border.Thickness = 1;
myLegend = new CompositeLegend();
myLegend.ChartLayers.Add(myColumnLayer);
myLegend.ChartLayers.Add(myColumnLayer2);
myLegend.ChartLayers.Add(myColumnLayer3);
myLegend.ChartLayers[1].LegendItem = LegendItemType.Auto;
myLegend.Bounds = new Rectangle(0, 85, 15, 15);
myLegend.BoundsMeasureType = MeasureType.Percentage;
myLegend.PE.ElementType = PaintElementType.Gradient;
myLegend.PE.FillGradientStyle = GradientStyle.ForwardDiagonal;
myLegend.PE.Fill = Color.CornflowerBlue;
myLegend.PE.FillStopColor = Color.Transparent;
myLegend.Border.CornerRadius = 10;
myLegend.Border.Thickness = 1;
Please take a look at the attached sample for more details and let me know if you have any questions
please see the attached image, i want to change the line to square or other shapes.
-Chris