FlexChart Datasource VB example

Posted by: glenn on 12 October 2017, 3:07 am EST

    • Post Options:
    • Link

    Posted 12 October 2017, 3:07 am EST

    I am downloading a datatable, then using the FlexChart.DataSource = mydatatable in vb.

    How do I update the flexchart?

    Sorry I’m learning C#.

  • Posted 12 October 2017, 5:42 pm EST

    Hi,

    After setting FlexChart’s DataSource, you also need to add Series and set their Binding to the columns of the datatable as follows:

    
            Dim series1 As New C1.Win.Chart.Series()
            Dim series2 As New C1.Win.Chart.Series()
    
            ' name the series
            series1.Name = "Population (in million)"
            series2.Name = "GDP (in $Billion)"
    
            ' add the series to the series collection
            FlexChart1.Series.Add(series1)
            FlexChart1.Series.Add(series2)
    
            ' bind X-axis and Y-axis 
            FlexChart1.BindingX = "Country"
            series1.Binding = "Population"
            series2.Binding = "GDP"
    
    

    I have also uploaded a sample application binding C1FlexChart to a DataTable, you may download the same from: https://www.dropbox.com/s/k912xvng46anmoi/prj_C1FlexChart_VB.zip?dl=0

    Regards,

    Ruchir Agarwal

Need extra support?

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

Learn More

Forum Channels