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
205
DataSet as a data source
posted

AFAIK when providing a DataTable to a chart, each row is a serie, with each column corresponding to a column of chart. The value of the "cell" is the value drawn.

Swapping columns and rows lets me draw *one* serie where the DataTable is given as a collection of rows of  label/value pairs.

Is it possible to draw a chart with *multiple* series as collections of label/value pairs? I tried to set the data source with a DataSet that contains several DataTable's each one representing a serie. It didn't work, it only draws one serie.

BTW, the chart is a 2D LineChart.

Regards,

-Hernán.

  • 28496
    Verified Answer
    Offline posted

    this is possible if you use the Series collection as a datasource.  just add several NumericSeries, and bind each one to a different DataTable in the DataSet.

    if you are using the DataSource property of the chart, you must bind to a single table, although that could be used to generate several series if SwapRowsAndColumns = true and you have several numeric columns in your table.