Hello,
This is my first attempt to use the UltraChart component and I have not found what I am looking for in the documentation. I am using NetAdvantage for .NET 2008 Vol. 1 CLR 2.0 with ASP and VB. I have the chart datasource bound to a dataset that uses a stored procedure in SQL Server. The code for that is :
Me.UltraChart1.DataSource = ds10
Me.UltraChart1.DataBind()
Me.UltraChart1.Visible = True
I am using the following code to call the dataset:
Public Function GetRevenueSummaryByMonth(ByVal ClaimYear As Integer, ByVal Region As String) As Data.DataSet
Dim SqlConnect As New SqlConnection(DsnCodeMaker)Dim SqlCommand As SqlCommand
Dim SqlDataAdapter As SqlDataAdapterDim SqlDataSet As Data.DataSetSqlCommand = New SqlCommand("procGetRevenueSummaryByMonth", SqlConnect)
SqlCommand.CommandType = Data.CommandType.StoredProcedure
SqlCommand.Parameters.Add(
"@ClaimYear", Data.SqlDbType.Int)SqlCommand.Parameters("@ClaimYear").Value = ClaimYear
SqlCommand.Parameters(
"@ClaimYear").Direction = Data.ParameterDirection.InputSqlCommand.Parameters.Add("@Region", Data.SqlDbType.VarChar, 3)
SqlCommand.Parameters(
"@Region").Value = RegionSqlCommand.Parameters("@Region").Direction = Data.ParameterDirection.InputSqlDataAdapter = New SqlDataAdapter
SqlDataAdapter.SelectCommand = SqlCommand
SqlDataSet =
New Data.DataSetSqlDataAdapter.Fill(SqlDataSet, "GetRevenueSummaryByMonth")
SqlConnect.Close()
Return SqlDataSet
I know the dataset call works as I am using it to fill a datagrid. But I also want to create a simple column chart of the data returned in that dataset.
The dataset has 14 columns: Region, Location, and one for each month. The first 2 are strings and the rest are currency.
I want the graph to group the locations by region and show the revenue for each month. Only a single year's data is returned in the dataset.
How do I tell it to layout the data?
Any help would be appreciated.
K.