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
220
Series Binding
posted

I have attached the Chart image where i have problem in series chart binding and also find the below coding for series binding which i have used kindly go through the code and chart and help me as soon as possible

problem:

In the stack area chart for a new bar doesnt start from the zero position.

 

Code:-

For i As Integer = 0 To oDs.Tables(1).Rows.Count - 1

dtSeries = oDs.Tables(1).Clone

drRow = dtSeries.NewRow

drRow(0) = oDs.Tables(1).Rows(i)(
"Block_Id")

drRow(1) = oDs.Tables(1).Rows(i)("DEMAND_ORDER_ID")

drRow(2) = oDs.Tables(1).Rows(i)("STARTDTE")

drRow(3) = oDs.Tables(1).Rows(i)("ENDDTE")

drRow(4) = oDs.Tables(1).Rows(i)("MFG_QTY_IN_BLOCK")drRow(5) = oDs.Tables(1).Rows(i)("BLOCK_SIZE")

dtSeries.Rows.Add(drRow)

drRow = Nothing

drRow = dtSeries.NewRow

drRow(0) = oDs.Tables(1).Rows(i)(
"Block_Id")

drRow(1) = oDs.Tables(1).Rows(i)("DEMAND_ORDER_ID")

drRow(2) = oDs.Tables(1).Rows(i)("ENDDTE")

drRow(3) = oDs.Tables(1).Rows(i)("STARTDTE")

drRow(4) = oDs.Tables(1).Rows(i)("MFG_QTY_IN_BLOCK")drRow(5) = oDs.Tables(1).Rows(i)("BLOCK_SIZE")

dtSeries.Rows.Add(drRow)

If dtSeries.Rows.Count > 0 Then

series = GetNumericSeriesBound1(dtSeries)

myColumnLayer1.Series.Add(series)

Me.UltraChart1.CompositeChart.Series.Add(series)

End If

Next

 

 

 

 

 

Private Function GetNumericSeriesBound1(ByVal table As DataTable) As NumericTimeSeriesDim series As New NumericTimeSeries

series.Label = table.Rows(0)(0)

series.Key = table.Rows(0)(0)

' this code populates the series from an external data source

series.Data.DataSource = table

series.Data.TimeValueColumn = "STARTDTE"

'series.Data.LabelColumn = "Label Column"

series.Data.ValueColumn = "MFG_QTY_IN_BLOCK"

Return series

End Function

 

Thanks in Advance,

Suresh

Parents Reply Children
No Data