Hi,
I'm trying to create a composite column chart with line chart. The issue is that I'm getting a dataTable (for the column chart's data), which includes one label column and 3 data columns.
How can I do it from the code?
I mean - i know I need to do it for the series like:
seriesColumn.Data.ValueColumn = "Availability";
But How do I add another Value columns to the series?
Please advice
Thanks
Maya
intel
You should create a series for each numeric column in your data table.
For example:columnSeries1.Data.LabelColumn = "Entity";columnSeries1.Data.ValueColumn = "NumericColumn1";columnSeries2.Data.LabelColumn = "Entity";columnSeries2.Data.ValueColumn = "NumericColumn2;columnSeries3.Data.LabelColumn = "Entity";columnSeries3.Data.ValueColumn = "NumericColumn3;columnLayer.Series.Add(columnSeries1);columnLayer.Series.Add(columnSeries2);columnLayer.Series.Add(columnSeries3);
But what if I want each row in the DataTable to be a series? (and not each column)
The number of rows is dynamically and I want to map each row to a series with all of the columns in the DataTable. (like the default non-composite column chart )
Composite series can only be bound to columns, so if you want for each series to represent a row, you will have to loop through your data and add a new data point to the series for each column in a row. You can also try setting SwapRowsAndColumns property on the column chart layer to true to get a similar effect, but that will not change the way the chart is bound to data.