Hi
I am trying to bind a DataTable to a pie chart, but nothing is drawn what am I missing? Below is a snippet of the code.
Private Sub DrawPieChart(ByVal dt As DataTable)
Dim chart = GetChartObject()
_reportContent.Controls.Clear()
_reportContent.Controls.Add(chart)
Dim pieSeries As New Steema.TeeChart.Styles.Pie(chart.Chart)
pieSeries.YValues.DataMember = dt.Columns("PeriodUsage").ToString
pieSeries.LabelMember = dt.Columns("DeviceEndpointId").ToString
pieSeries.DataSource = dt
'pieSeries.CheckDataSource()
End Sub
Binding at design time Compact Framework
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Binding at design time Compact Framework
Hi jasmine,
Try uncommenting the CheckDataSource call. Did that help? You'll find some examples on the subject here and in Tutorial8 - ADO.NET Database Access. Tutorials can be found at TeeChart's program group.
If this doesn't help don't hesitate to let us know.
Try uncommenting the CheckDataSource call. Did that help? You'll find some examples on the subject here and in Tutorial8 - ADO.NET Database Access. Tutorials can be found at TeeChart's program group.
If this doesn't help don't hesitate to let us know.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Binding at design time Compact Framework
I tried it with pieSeries.CheckDataSource() not commented, but it did not help.
Right now I switch the code to draw the chart to
Dim count As Integer = 1
For Each row As DataRow In dt.Rows
pieSeries.Add(count, CDbl(row("PeriodUsage")), row("DeviceEndpointId").ToString)
count += 1
Next
This works fine but I prefer to use the bind option.
I am using VS 2008, with the Steema TChart .NET 2012
Right now I switch the code to draw the chart to
Dim count As Integer = 1
For Each row As DataRow In dt.Rows
pieSeries.Add(count, CDbl(row("PeriodUsage")), row("DeviceEndpointId").ToString)
count += 1
Next
This works fine but I prefer to use the bind option.
I am using VS 2008, with the Steema TChart .NET 2012
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Binding at design time Compact Framework
Hi jasmine,
What about the examples at the thread I pointed in my previous reply and the tutorials?
If the problem persists can you please attach a simple example project we can run "as-is" to reproduce the problem here?
Thanks in advance.
What about the examples at the thread I pointed in my previous reply and the tutorials?
If the problem persists can you please attach a simple example project we can run "as-is" to reproduce the problem here?
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |