I am creating ScatterSeries
var scatterSeria = new ScatterSeries
{
XValueMember = "COLUMN0", YValueMember = "COLUMN1",
HorizontalAxis = horizontalAxis1,
VerticalAxis = verticalAxis1,
Shape = new CircleShape(),
BackColor = Color.Red,
BorderColor = Color.Black,
PointSize = new SizeF(10.0f, 10.0f),
IsVisibleInLegend = true
};
But the border of the shape is not drawn in black on the chart. But the same shape is drawn in the legend with a black border.
In a legend, I draw a shape using
private void LegendElement_VisualItemCreating(object sender, LegendItemElementCreatingEventArgs e)
{
e.ItemElement = new LegendItemElement(e.LegendItem);
if (!(e.LegendItem.Element is ScatterSeries seria)) return;
e.ItemElement.MarkerElement.Shape = seria.Shape;
}
How to set the border color for the shape on the chart?