Flexchart - Line Chart

Posted by: mwebster on 23 July 2019, 11:18 am EST

    • Post Options:
    • Link

    Posted 23 July 2019, 11:18 am EST

    Hello, I am working with FlexChart (Win forms, VB.NET) and I am trying to create a chart which features:

    The X-Axis shows the months of the selected year.

    The Y-Axis shows the total amount of all quotes per user for each month.

    I need to be able to plot the Y-Axis values for multiple users, each with a line in a different colour.

    I can get it to display one user at a time but I am not sure how to display the data points for more than one user at the same time. Can you give me any hints in that regard?

    Thanks,

    Mike

  • Posted 24 July 2019, 1:38 am EST

    Hi Mike,

    FlexChart allows to provide individual data source for each Series. So, for your requirement you can structure your data source as a collection of monthly data(which is a collection again) for each user and create a Series for each user in the chart.

    For userId As Integer = 1 To 5
     If _data.Count < userId Then
      _data.Add(New ObservableCollection(Of DataItem)())
      Dim ser = New Series() With {
       .Name = "User " & userId,
       .DataSource = _data(userId - 1)
      }
      flexChart1.Series.Add(ser)
     End If
    Next
    
    Where _data is as follows:
    
    _data = New List(Of ObservableCollection(Of DataItem))()
    
    

    Please refer the attached sample(prj_MultiSourceVBFlexChart.zip) for complete implementation of the same.

    Thanks,

    Basant

    prj_MultiSourceVBFlexChart.zip

  • Posted 24 July 2019, 10:30 am EST

    Great. Thanks

    Mike

  • Posted 25 July 2019, 2:12 pm EST

    You don’t have any VB samples do you? That is what I am working in.

    Thanks,

  • Posted 26 July 2019, 4:14 am EST

    Hello,

    The sample shared by Basant was created in VB.Net language only. So, if you’re looking for any other sample in VB, please mention the specific name.

    Thanks,

    Ruchir

  • Posted 26 July 2019, 9:00 am EST

    Thanks! Not sure how I missed that. That is exactly what I am looking for.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels