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!
Hello,
Looking at the code you have provided I am curious on how you want your whole chart to appear. It looks like you are trying to use both the LineChart settings and the Composite chart. If you want to just show a line chart then you'll want to follow the code that is provided in the following documentation article:
http://help.infragistics.com/Doc/ASPNET/Current/CLR4.0/?page=WebChart_Creating_Line_Chart_Using_Code.html
If you instead would like a composite chart then the most notable thing that you are missing is the axes. In particular, the axes of a composite chart have very specific requirements to be able to render your data:
http://help.infragistics.com/Help/Doc/ASPNET/2014.2/CLR4.0/html/Chart_Axis_Requirements_for_Composite_Charts.html
Were you able to get your line charting rendering correctly? Please let me know if I may be of any further help.