Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
405
Add a line chart that bound to a datatable to a composite chart
posted

Hi, 

I tried to add a line chart to a composite chart and this line chart is bound to a datatable.

after i set the datasource of a series, this chart was blank...

I found some examples about to add line charts in composite chart, but they add points in code, not bound to a datatable.

Would you please show me a example about how to add a line chart that bound to a datatable to a composite chart?

the datatable like this:

                      A100    A200  A300  A400  A500

TypeA             10        14        8        -10     -5      

TypeB            15         5          -5       -3        0

I tried to draw two lines in this chart and will add other charts in this composite chart. 

thanks a lot.

Parents
No Data
Reply
  • 17605
    posted

    You can bind data source to a series and add this series to the series collection:

    NumericSeries series = new NumericSeries();

    series.Data.DataSource = table;

    series.DataBind();

     

Children
No Data