SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & 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 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.


hi all, I’m using SciChart with MVVM light.

I am working on a stock chart OHLC and data are coming in from Mintpal.

Mintpal has an API where you can request a specific date range: 6 hours, 24 hours, 1 week, etc.

Running the application requests for 6 hours OHLC data, and on the application, I can select 24 hours, 3 days, 1 week

my problem is, how do you automatically adjust the zoom level without double clicking the cart?

Autorange is set by the way on YAxisStyle

To know about my problem, here’s a sample video using the test app I made.

  • You must to post comments

You can try with for example this line of code:

YAxis.VisibleRange = RangeFactory.NewWithMinMax(this.YAxis.VisibleRange, yaxisminimRange, yaxismaximumRange);

You can also look at the examples with ViewportManager. However i think the line above is what you need. Of course this is for the Y axis but you can do the same for the X Axis. Just make sure to use the correct format.

Here is a good example with the ViewportManager: Zoom Including Annotations

  • jaysonragasa
    I am using MVVM light.. I am not really sure how to implement that on the code behind of the Window. But I'll see what I can do. Can I ask, how do you enumerate child charts on a chart group? Thanks
    • Guest
    • 4 years ago
    • 1
    hi, you could bind the ViewportManager to your ViewModel, please, take a look at the Drag Horizontal Threshold example
  • Andrew
    And another ViewportManager example in your other question on ZoomExtents of charts in a SciChartGroup. This is the way to directly control the chart from a ViewModel. Thanks everyone who posted!
  • jaysonragasa
    I found another way which works as well <s:SciStockChart.XAxisStyle><Style TargetType="s:CategoryDateTimeAxis"><Setter Property="AutoRange" Value="Always"/></Style></s:SciStockChart.XAxisStyle>
  • Andrew
    Awesome, thanks for sharing! You can create your own answer and we can vote for it if you want
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.