SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components

0
0

Is there any way to have a FastLineRenderableSeries have more than one color?

I have several series sources with a minimum of eight series generate from them. Each source is unique (a file) and each signal (Displacement, Force, etc) is also unique.

To help the user identify which signal is which i’d like to apply something like the color coding used on the wire with a stripe when there are many conductors.

I’d like to use a drawing brush such as:

        <DrawingBrush x:Key="DrawingBrush" TileMode="Tile"
                      Viewport="0, 0, 16, 2" ViewportUnits="Absolute"
                      Viewbox="0, 0, 16, 2" ViewboxUnits="Absolute">
            <DrawingBrush.Drawing>
                <DrawingGroup>
                    <GeometryDrawing Brush="Red">
                        <GeometryDrawing.Geometry>
                            <LineGeometry StartPoint="0,0" EndPoint="7,0" />
                        </GeometryDrawing.Geometry>
                        <GeometryDrawing.Pen>
                            <Pen Brush="Red" Thickness="4" />
                        </GeometryDrawing.Pen>
                    </GeometryDrawing>
                    <GeometryDrawing Brush="Black">
                        <GeometryDrawing.Geometry>
                            <LineGeometry StartPoint="9,0" EndPoint="15,0" />
                        </GeometryDrawing.Geometry>
                        <GeometryDrawing.Pen>
                            <Pen Brush="Black" Thickness="4" />
                        </GeometryDrawing.Pen>
                    </GeometryDrawing>
                </DrawingGroup>
            </DrawingBrush.Drawing>
        </DrawingBrush>

But I bet that’s a performance hit and frowned on.

See attach bitmap for artists conception of potential appearance.

Any ideas hints or suggestions?

Version
Latest
  • You must to post comments
0
0

Sorry, couldn’t post bitmap with original post…

Images
  • You must to post comments
0
0

Hi Doug

While SciChart WPF Supports changing the colour of the series on a per-point basis (see PaletteProvider API), and it also supports dashed lines via StrokeDashArray, it does not support applying a custom brush or repeating pattern to the series I’m afraid. We also don’t have plans to add this as yet. As you’ve guessed it’s not an easy thing to do!

Sorry I cannot be more help,

Best regards,
Andrew

  • Doug
    I’m a source customer, and I haven’t dug into the depths of FastLineRenderableSeries yet (and don’t really want to). Just thinking out loud, I was thinking about the stroke dash array and using a second renderable series with a different dash pattern. I don’t want to duplicate the data at 20,000 or points or more. Problems come with selection, i.e., select either series should select both, etc. Does doubling up a FastLineRenderableSeries seem doable or even a reasonable approach? If it does, I might head down that. road
  • Andrew Burnett-Thompson
    That might actually work – a series with two dash arrays. I will ask the team if we can come up with a solution. It might be quite simple (case of overriding a FastLineRenderableSeries Draw method and drawing twice, once with and once without a StrokeDashArray)
  • Doug
    Awesome that’d be perfect… sorry for the slow response…
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.