Hi.
I have an issue that I can't solve.
I've created winultrachart with two layers. One of them is ColumnChart, the second one is Linechart.
The line chart is populated nice if I have only integer values. But if some of values are not integer the disappears from the chart.
Please help!!!
Here's the datatable, representing values for the linechart:
Here's the code:
Me.chrtCCFPM.ChartType = ChartType.Composite
Me.chrtCCFPM.CompositeChart.Series.Clear()
Me.chrtCCFPM.CompositeChart.ChartLayers.Clear()
If blnFirstLoad = False Then
Me.chrtCCFPM.CompositeChart.ChartAreas.Item(0).Axes.Clear()
End If
Me.chrtCCFPM.CompositeChart.ChartAreas.Clear()
Me.chrtCCFPM.DataSource = Nothing
Dim myChartArea As New ChartArea()
Me.chrtCCFPM.CompositeChart.ChartAreas.Add(myChartArea)
Dim axisX As New AxisItem()
axisX.OrientationType = AxisNumber.X_Axis
axisX.DataType = AxisDataType.String
axisX.SetLabelAxisType = SetLabelAxisType.GroupBySeries
axisX.Labels.Visible = False
Dim axisXLine As New AxisItem()
axisXLine.OrientationType = AxisNumber.X_Axis
axisXLine.DataType = AxisDataType.String
axisXLine.SetLabelAxisType = SetLabelAxisType.ContinuousData
axisXLine.Labels.Visible = False
Dim axisY As New AxisItem()
axisY.RangeMin = 0
axisY.RangeMax = 100
axisY.RangeType = AxisRangeType.Custom
axisY.OrientationType = AxisNumber.Y_Axis
axisY.DataType = AxisDataType.Numeric
axisY.Labels.ItemFormatString = "<DATA_VALUE:0.#>"
Dim axisYLine As New AxisItem()
axisYLine.RangeMin = 0
axisYLine.RangeMax = 100
axisYLine.RangeType = AxisRangeType.Custom
axisYLine.OrientationType = AxisNumber.Y_Axis
axisYLine.DataType = AxisDataType.Numeric
myChartArea.Axes.Add(axisX)
myChartArea.Axes.Add(axisY)
myChartArea.Axes.Add(axisXLine)
For i = 0 To dsChartDtata.Tables.Count - 2
Dim series As New NumericSeries()
series.Label = marrSeriesNames(i + 1)
series.Data.DataSource = dS.Tables(i)
series.Data.LabelColumn = "Label"
series.Data.ValueColumn = "Value"
Me.chrtCCFPM.CompositeChart.Series.Add(series)
Next
'Line series
Dim seriesLine As New NumericSeries()
seriesLine.Label = String.Empty
seriesLine.Data.DataSource = dS.Tables(dsChartDtata.Tables.Count - 1)
seriesLine.Data.LabelColumn = "Label"
seriesLine.Data.ValueColumn = "Value"
Me.chrtCCFPM.CompositeChart.Series.Add(seriesLine)
Dim myColumnLayer As New ChartLayerAppearance()
myColumnLayer.ChartType = ChartType.ColumnChart
myColumnLayer.ChartArea = myChartArea
myColumnLayer.AxisX = axisX
myColumnLayer.AxisY = axisY
For i = 0 To Me.chrtCCFPM.CompositeChart.Series.Count - 2
myColumnLayer.Series.Add(Me.chrtCCFPM.CompositeChart.Series(i))
Me.chrtCCFPM.CompositeChart.ChartLayers.Add(myColumnLayer)
Dim myLineLayer As New ChartLayerAppearance()
myLineLayer.ChartType = ChartType.LineChart
myLineLayer.ChartArea = myChartArea
myLineLayer.AxisX = axisXLine
myLineLayer.AxisY = axisY
DirectCast(myLineLayer.ChartTypeAppearance, LineChartAppearance).MidPointAnchors = False
myLineLayer.Series.Add(Me.chrtCCFPM.CompositeChart.Series(dsChartDtata.Tables.Count - 1)) --the dataset above is used here
Me.chrtCCFPM.CompositeChart.ChartLayers.Add(myLineLayer)
axisX.Extent = 12
axisXLine.Extent = 12
axisY.Extent = 15
axisX.MajorGridLines.Visible = False
axisX.MinorGridLines.Visible = False
axisXLine.MajorGridLines.Visible = False
axisXLine.MinorGridLines.Visible = False
axisY.MajorGridLines.Visible = False
axisY.MinorGridLines.Visible = False
axisYLine.MajorGridLines.Visible = False
axisYLine.MinorGridLines.Visible = False
Hi Irina,
I attempted to reproduce this in a small sample. I used your code to build a chart and it appears that all the data points show correctly. Please run this sample and let me know if you get similar results.
Hi Mike.
Thank you for your answer.
Actually I've found and resolved the issue.
The problem was that depending on the language application is using numeric values should be in different formats.
Our application is adopted for bi-langue users, so in English it worked fine but when switching to french it was necessary to replace "." by "," in numeric values like "78.5" becomes "78,5" and so on...
Now it works
Thank you