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
100
UltraChart Line Chart problem binding to a datatable.
posted

I am new to using the Ultra Charts but I have managed to create bar charts using VB.Net code that uses a data table as its data source. I am having a problem getting the line chart to work using the same data source. The line chart does work if I create unbound data points as a data source.  

Below please find the code I am using. Is there something I am missing in the code to make the chart work? Is there any sample code I can use as a reference?  The error message I am receiving when I run the report is : Line Chart Error:  You must have at least one row and one numeric column.

'Create the Chart Type
Me.uwgLateLine.ChartType = ChartType.LineChart

'Create the Chart Area
Dim myChartArea1 As New ChartArea()
Me.uwgLateLine.CompositeChart.ChartAreas.Add(myChartArea1)

' Add the first series to the Line Chart
Dim series1to5Days As New NumericSeries()

' Assign the Series a DataSource
series1to5Days.Data.DataSource = dtLateItemDetailsTranspose
series1to5Days.Data.LabelColumn = "LateItemDetails"
series1to5Days.Data.ValueColumn = "Total"

uwgLateLine.LineChart.ChartComponent.Series.Add(series1to5Days)

uwgLateLine.DataBind()

Thank you for any help you can provide!