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
190
Series colours / Lines
posted
Afternoon all, Is there anyway to gain access to what row in the data source relates to what series on a line chart? I'm asking because I'm drawing custom lines on the chart using the FillGraphScene method of the chart. So far I've got the chart to paint the lines, but they are all coming out black (I can fix this), what I now need to do is alter either the line appearance to match the series that the line comes from or the line colour to the one where the series comes from. Brief explination why: if you have a line chart where there are 2 points in the same series but separated by several data points - The points do paint correctly but the lines are not connected which is what I want... I've looked at the scatter chart and ScatterLine but they 2 dont plot the lines exactly how I need them so resorted to this custom way. Alternatively if there is a way to specify a specifix index in the color model pallette that I can set a custom line to it would be helpful. Thanks, Brendon
Parents
No Data
Reply
  • 26458
    Offline posted

    Your lines should be represented by the Polyline primitives. Check the Row property of the polyline to see which datarow its data came from. This would only apply to the lines that get drawn by the chart, and not the lines you drew yourself using FillSceneGraph.

    The custom pallette is just a color array. If you know the color index, you can use chart.ColorModel.CustomPallette[index] to get a color.

Children