To create a data table and bind the C1BubbleChart to it, complete the following steps:
To write code in Visual Basic
| Visual Basic |
Copy Code
|
|---|---|
Imports System.Data.OleDb |
|
To write code in C#
| C# |
Copy Code
|
|---|---|
using System.Data; using System.Data.OleDb; using C1.Web.ASP.Net Controls.C1Chart; |
|
To write code in Visual Basic
| Visual Basic |
Copy Code
|
|---|---|
string Conn = @"provider=Microsoft.Jet.Oledb.4.0; Data Source=|DataDirectory|\\C1NWind.mdb"; |
|
To write code in C#
| C# |
Copy Code
|
|---|---|
Dim Conn As String = "provider=Microsoft.Jet.Oledb.4.0; Data Source=|DataDirectory|\\C1NWind.mdb" |
|
To write code in Visual Basic
| Visual Basic |
Copy Code
|
|---|---|
C1BubbleChart1.DataSource = dt |
|
To write code in C#
| C# |
Copy Code
|
|---|---|
C1BubbleChart1.DataSource = dt; |
|
To write code in Visual Basic
| Visual Basic |
Copy Code
|
|---|---|
Dim cb As New C1.Web.ASP.Net Controls.C1Chart.C1BubbleChartBinding()
cb.YField = "UnitsInStock" cb.Y1Field = "CategoryID" C1BarChart1.DataBindings.Add(cb) |
|
To write code in C#
| C# |
Copy Code
|
|---|---|
C1.Web.ASP.Net Controls.C1Chart.C1BubbleChartBinding cb = new C1.Web.ASP.Net Controls.C1Chart.C1BubbleChartBinding(); cb.YField = "UnitsInStock"; cb.Y1Field = "CategoryID"; |
|
This topic illustrates the following:
The following image shows the C1BubbleChart bound to a data table:
