Right I've finally got the painting of the line points correctly plotting after fighting to no end with the chart... However there is still one thing that is perplexing to me... WHY are the points not being painted the same colour as the series shown in the legend - IMO this is a bug in the control set as I have been unable to ascertain how to actually get them to be painted the correct colour. Any ideas anyone? Having black dots all over the chart when the legend shows the correct series looks very unprofessional.
Sorry for not posting sooner I've been in meetings this morning and not had chance to update the thread.
I found that the lines were getting painted in black while attempting to paint new points on the chart not in the colour of the series... The code I've got now to do almost what I need the UltraChart looks like this (note that the points now paint in the correct colour after digging through some more properties). To be honest I am actually trying to use the custom interpolation but it is going a little pear shaped and has been for a week now :|
Private Sub ulchtRender_FillSceneGraph(ByVal sender As Object, ByVal e As Infragistics.UltraChart.Shared.Events.FillSceneGraphEventArgs) Handles ulchtRender.FillSceneGraph
If Me.ulchtRender.ChartType = ChartType.LineChart Then
Debug.Print(p.GetType.ToString)
If (TypeOf p Is Polyline) Then
Dim Chartpoints As ChartPointsToPaint = Nothing
StartPointX = NothingStartPointY = NothingCurrentPointX = NothingCurrentPointY = Nothing
For Each pt As Infragistics.UltraChart.Core.Primitives.DataPoint In CType(p, Infragistics.UltraChart.Core.Primitives.Polyline).pointsIf pt.Value IsNot Nothing Then
'Points to paint in case there is only 1 point for the series
paintPoint.StartPointX = pt.point.XpaintPoint.StartPointY = pt.point.YpaintPoint.LineColour = p.PE.Fillm_PaintPoints.Add(paintPoint)Next
For Each paintPt As ChartPointsToPaint In m_PaintPointsDim myCicrle As New Ellipse(New System.Drawing.Point(CInt(paintPt.StartPointX), CInt(paintPt.StartPointY)), 2)myCicrle.PE = New PaintElement(paintPt.LineColour, paintPt.LineColour, GradientStyle.Circular)e.SceneGraph.Add(myCicrle)Next
m_PaintPoints.Clear()End If
End Sub
Public Structure ChartPointsToPaintPublic rowID As IntegerPublic StartPointX As ObjectPublic StartPointY As ObjectPublic EndPointX As ObjectPublic EndPointY As ObjectPublic LineColour As Drawing.ColorEnd Structure
You can try adding:
myCicrle.PE.StrokeWidth = 0
because by default a black line is drawn.
Something slightly off at a tangent; Why if there is only 1 data point for a series does it not plot the point? The whole excercise of the code above was JUST to plot the points so that we could view them on the chart.
Ok, I got it, but the chart is designed to work in this way. If you want in this case to be displayed just one point you can submit a feature request here:http://devcenter.infragistics.com/protected/requestfeature.aspx