Answered Chart in Vb.net

  • 2012年8月16日 上午 09:28
     
     

    Hi I m creating a chart in vb.net  & a Taskbar which will shows duration in minutes, hours.

    when i scroll taskbar i want a chart to change with respect to taskbarvalue . this works fine with first scroll event of taskbar.... but when i scroll tak bar again i get folloein error at below line

    Line

      Dim Series1 As Series = Chart2.Series("Series1")

    Error 

    A chart element with the name 'Series1' could not be found in the 'SeriesCollection'.

    So how to get rid of this error..

    plzz help


所有回覆

  • 2012年8月16日 下午 12:25
     
     已答覆

    I got the Answer

    If Chart2.Series.Count = 0 Then
                Chart2.Series.Add("Series1")
            End If

    • 已標示為解答 DonIzzBack 2012年8月16日 下午 12:25
    •