I am trying to enable and disable line points on a chart with checkboxes. However when I am clicking the checkboxes the x axis which are set to DateTime are changing! It is quite annoying. Here is an example of the pictures before and afterwards below.
This is the image after selecting the check box. I would like to try and stop this from happening and add check boxes for each series so I can enable and disable the lines. Then the user can just view one at a time.
The code is below:
private void radCheckBox1_ToggleStateChanged(object sender, Telerik.WinControls.UI.StateChangedEventArgs args)
{
if (radCheckBox1.Checked == false)
{
chart1.Series["Series1"].Points.Clear();
}
else
{
for (int x = 0; x < HRM.Active.DataRows.Count; x++)
{
chart1.Series["Series1"].Points.AddXY(x, HRM.Active.DataRows.ElementAt(x).Speed);
}
}
}
Aucun commentaire:
Enregistrer un commentaire