Pre loader

How to exclude axis in zoom calculation

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

Answered
0
0

Hello,

I have taken the FastColumnRenderableseries and flipped some of the internals to create a FastRowRenderableseries. My question is how can I exclude the additional axis (Numeric type) from zoom calculations including extents, rubber band, mouse, etc.

The row series was implemented to create a way to show a magnitude in the X axis at specific price levels (volume accumulated at price level) of the SciStockChart y price axis. I did try using the column series but with a different placement but it’s zoom would size incorrectly.

I have tried using the viewport managers, as well as catching the axis changed then iterating over the x axis price data series visible range to store the visible highest/lowest then setting the y axis visible range based on that highest/lowest.

Ideally, I’d like to find a way to use one of the pre-made viewport managers or a custom one so that modifiers won’t be affected.

Version
4.2.2.9445
Images
  • You must to post comments
Best Answer
0
0

Hi Jason,

There’s an easier way to do this.

  1. Have a secondary XAxis on the left (invisible). Bind this XAxis.VisibleRange to your normal chart YAxis.VisibleRange TwoWay
  2. Have a Secondary YAxis on the bottom (invisible).
  3. Use our standard (unmodified) FastColumnRenderableSeries
  4. Set X,Y data as you wish

This will work and has been used before to create Market Profile charts like the one you show.

Alternatively, to hack VisibleRange so it doesn’t get set…

Axis.VisibleRange is updated by several different things in SciChart, also in your own code. The Axis.VisibleRange can be updated by:

  1. Setting Axis.VisibleRange
  2. Double clicking ZoomExtents with a ZoomExtentsModifeir
  3. Calling SciChartSurface.ZoomExtents or similar
  4. Using any Zoom modifier
  5. via bindings if applicable
  6. via Shared mouse events if applicable.

You need to find out how/where this range is being set and unset it. The following technique can be used to blanket unset a range if need be:

Axis Ranging – Clipping VisibleRange

Scroll down to ‘Advanced VisibleRange Clipping and Manipulation’.

Best regards,
Andrew

  • Jason Neeley
    As always, thanks for the awesome help and even better response time.
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies