Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15038

Supress Display of Chart Series

$
0
0
I have a chart with 4 series. I want to toggle display of Series 4 off, and then click again to display the Series 4 back on the chart. I added a cmdToggle_Click () to the form that holds the chart.

I found this on a forum, and tried to modify it to get me started, but no joy.

Code:

Private Sub Button1_Click(sender As System.Object, ByVal e As System.EventArgs) 'Handles Button1.Click

    Static i As Integer
    i = i + 1
    Chart2.Series("Series1").Points.Clear()
    Chart2.Series("Series1").Points.AddXY(i, i) ' not wanting to add points just supress and then be able to unsupress
    Chart2.Update()

 End Sub


Ideas?

Viewing all articles
Browse latest Browse all 15038

Trending Articles