I have CustomGridLine to draw the the line(dashed line across Y-Axis on Bar Chart, this chart get changed according to the value selected in the Combobox and so the line,
First time the chart and the dashed line works perfect, but when I change the value in combo box, charts get redraw and also the line, problem here is the dashed line convert into one continious line (but I want the dashed line). However the line gets generated at the correct point.
Below is the code snippet:
On Selection Changed in combo box:
customGridLineClient.YIntercept = avg;
First time the chart and the dashed line works perfect, but when I change the value in combo box, charts get redraw and also the line, problem here is the dashed line convert into one continious line (but I want the dashed line). However the line gets generated at the correct point.
Below is the code snippet:
CustomGridLine
customGridLineOverall =
new CustomGridLine
{
Visibility =
Visibility.Visible,
Stroke =
new SolidColorBrush(Colors.Gray),
StrokeThickness = 3,
ElementStyle =
this.Resources[lineType] as Style
};
On Selection Changed in combo box:
myRadChart.DefaultView.ChartArea.Annotations.Clear(); //clear the annotation
customGridLineClient.YIntercept = avg;
myRadChart.DefaultView.ChartArea.Annotations.Add(customGridLineClient);