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

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

0
0

Hello,

We have a user story that requires multiple trend lines (around 16) each having different Y axes on a single chart (the data from each set is significantly different in magnitude but the X’s are common)

The multiple Y-axis capability of SciChart would be perfect but 16 axes just takes up too much space from the chart.

Unfortunately Log Y is not acceptable either.

We had one idea – see sketch attached where just the axis min and max for each trend are shown at the bottom/top of a single Y axis – but I would greatly appreciate any comments, thoughts or ideas about how this might be displayed as our one is less than optimal (i.e. it sucks)

Thanks and Kind Regards

Mark

Images
  • You must to post comments
0
0

Hi Mark,

Hmmm of course SciChart doesn’t support this out of the box, but there may be a workaround. This is an idea off the top of my head and requires investigation on your side (I haven’t tested it):

  • Start off by setting your 16 axes Visibility = Visibility.Collapsed. This will hide the axis and the gridlines, but keep the calculations for axis coordinates
  • Next create a custom modifier (derive from ChartModifierBase). Override OnParentSurfaceRendered. For guidance, since you have the source code, you can look at our other modifiers, e.g. Cursor, Rollover for how this overrides the render event and paints labels to the screen
  • In the rendered event, get all the RenderableSeries on the chart, get their associated Axis (see RenderableSeries.AxisId, and ChartModifierBase.GetAxisById(). Interrogate each axis to get VisibleRange Min, Max values
  • Now using the known Series Color of the series and the Axis Min, Max, render a text label on the ChartModifierBase.ModifierSurface (which is a canvas). You might have to set ClipToBounds false on that, or use a custom canvas if the labels don’t render outside the bounds

Try it – I’m interested to see how you get on, and feel free to post code if you get stuck!

Andrew

  • Mark Attwood
    Hi Andrew, Thanks for the way to try and achieve this - I will give it a go. Currently on vacation and PC is at home (where is should be!) so it will be a couple of weeks before I get to it but I'll let you know how it works out Kind Regards Mark
  • Andrew
    That's great Mark - give it a shot. Until now we haven't done a good tutorial or series on the extremely powerful ChartModifier API - instead letting it prove itself in our internal systems & using it for the occasional workaround for customers. What we're going to try and do for SciChart v2.0 is really mature this API and document it - hope you don't have to wait until then though, it sounds like you can probably do this now! In the meantime, have a nice holiday! :-) Thanks and regards, Andrew
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.