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
355
Non String X Axis in LineChart
posted

Hello!

I made a line graph that is giving me the following output:

Infragistics Graph - Unscaled

Below is the basic code:

chartProcessStats1.ChartType = Infragistics.UltraChart.Shared.Styles.ChartType.LineChart
'chartProcessStats1.ChartType = Infragistics.UltraChart.Shared.Styles.ChartType.ScatterLineChart

Dim temparrayx() As Decimal = New Decimal() {-10, 10, 100, 110, 120}
Dim temparrayy() As Decimal = New Decimal() {0.5, 3, 2, 3, 1}

Dim graphval As New NumericSeries()

Dim k As Integer = 0

chartProcessStats1.LineChart.ChartComponent.Series.Clear()

While (k < temperaturearray.Length)

graphval.Points.Add(New NumericDataPoint(temparrayy(k), temparrayx(k), False))

k = k + 1
End While

chartProcessStats1.LineChart.ChartComponent.Series.Add(graphval)

temperaturearray = {}
errorarray = {}

It appears the output is a result of the x axis being entered as a string rather than a decimal (despite the fact the actual array is made up of decimal values).  Is there a way to enter the x axis as decimals (so the graph scales properly)?

Thanks in advance!