Question

I've added two radio buttons in my vb.net 2008 application to display total sale graphically using MS Chart, 1st radio button is to display YEARLY data(bars) on chart and 2nd to display MONTHLY data(bars).

I want to get this chart refreshed, i.e whenever i click YEARLY the bars generated by MONTHLY radio must get erased and YEARLY data must get loaded, and viceversa. Now I'm facing problem that both the data YEARLY MONTHLY in displayed at one time

Bars are getting overlapped

Was it helpful?

Solution

You can just remove the series from the chart.

' Assuming the serie is called Serie1
Dim Serie1 As New Series("Monthly")

' Remove the serie from the chart
Chart1.Series.Remove(Serie1)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top