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 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 votes
616 views

SciChart WPF control

I’m trying to configure the axis range using VisibleRange. Is it possible that in Visible range, I set only min value and then max value is set automatically by tracking the maximum value series has? Same way, if I set max value of VisibleRange then min value is set automatically by tracking min value of the series? How to achieve the VisibleRange setting by just setting one of Min/Max value?

  • KC asked 4 weeks ago
  • last active 4 weeks ago
0 votes
0 answers
603 views

I want to know whether the FastRenderableSeries is out of VisibleRange or not. I can’t check with getIsVisible() as it could be invisible by the legend.

0 votes
591 views

Hi

We use ViewportManager to automatically calculate the visible range of Y-axis for all series in the chart.

   <s:SciChartSurface Margin="0, 5, 0, 0"  Grid.Column="2"
                           ViewportManager="{Binding ViewportManager}"
                           MinHeight="250" MinWidth="250"
                           x:Name="MainChartSurface"
                           RenderableSeries="{s:SeriesBinding SeriesVms}"
                           ChartTitle="{Binding ChartModel.Title}"
                           Loaded="MainChartSurface_Loaded"
                           YAxes="{Binding YAxes}"
                           XAxes="{Binding XAxes}"
                           Style="{StaticResource YAxisStyle}"
                           Annotations="{s:AnnotationsBinding ChartModel.Annotations}">
      :
      : (omitted for brevity)
   </s:SciChartSurface>

This approach works fine for one chart.

We now have an additional requirement, which is to have the same VisibleRange for Y-axis over multiple charts. Basically, the VisibleRange should be set to be the [Min, Max] range over all the series in all charts.

Is there a way to achieve this with ViewportManager ?
Is there a way to make several charts related and assign it a common instance of ViewportManager?

BR, Gianni

0 votes
769 views

When I’m writing VisibleRange=”0, 10″ it works as if I’d wrote “0, 1”.
See my video https://youtu.be/nJTW5-3kO_o

0 votes
822 views

If I set AutoRange = “Always” myHorizontalLineAnnotation draws fine. When I set it to “Never” – which I want – my HorizontalLineAnnotation won’t draw. How do I do this? ty

  <s:SciChartSurface.YAxis>
        <s:NumericAxis AutoRange="Never"
                       VisibleRange="{Binding ElementName=this, Path=YMinMax}"

        <s:HorizontalLineAnnotation HorizontalAlignment="Stretch"
                                    Y1="{Binding ElementName=this, Path=CurrentHigh}"
                                    Stroke="{Binding ElementName=this, Path=ToleranceColor}"
                                    StrokeThickness="1" />
2 votes
1k views

I am implementing a feature to load more historical data when users pan to the left side on a CategoryDateAxis.
To load more, i need to have 2 Date which is the earliest data point i have and the Date that is shown on the X-Axis

For the earliest data point, i can get via IXyDataSeries#getXMin()
But for the other Date, i’m not sure how to get it. I can listen to range changes via IAxisCore#VisibleRangeChangeListener, but the range returns Double. I cant figure out to convert it into a Date

  • abc def asked 2 years ago
  • last active 2 years ago
0 votes
1k views

I manually re-calculate my displayed axis ranges when new data points are appended or when a specific portion of the data is selected to view from a ListBox, but I would like to leave the axis ranges as-is if the user has zoomed-in (using the built-in ZoomModifiers). Is there a way for my ViewModel to know this has happened so I can avoid recalculating in that case?

Thanks!

1 vote
1k views

Due to the user often needing to select pre-specified ranges of data to view, I handle the X- and Y-axis VisibleRange manually in code.
I also have both RubberBandXyZoomModifier and MouseWheelZoomModifier enabled.
Instead of using a generic ZoomExtentsModifier (which would show all data), I handle a MouseDoubleClick in code and set the VisibleRanges to the bounds of the user-selected data area’s range.

Now if the RubberBand zoom is used followed by a double-click, the VisibleRange.SetMinMax function gets called with the correct values in my code, but that range does not appear on the chart. However if a MouseWheelZoom is used after the RubberBand zoom, it works fine. Is there something about the RubberBand zoom that is stopping the VisibleRange.SetMinMax function values from being recognized by the chart?

Thanks!

0 votes
2k views

Hi,

I have graphs with VisibleRange set in both axes (Y and X). The way I would like my graphs to behave is as follows:

  1. When the graph is loaded, the VisibleRanges are applied in both axes.
  2. When I zoom, ZoomExtents applies to both axes
  3. When I double click on the graph to restore, the initial VisibleRanges as in (1) applies.

NB:
– I set the VisibleRange by Binding
– One of the graphs has a Logarithmic XAxis (Just incase it has a special treatment)
– Currently my graphs set VisibleRanges correctly at first, but not after zoom and restore.

Help me out with how to proceed, please.

Thanks in advance.

Kilosa M.

0 votes
1k views

Hi,

I’m having difficulties understanding the behaviour of a graph with the following axes:

<s:SciChartSurface.XAxis>
                            <s:LogarithmicNumericAxis DrawMajorBands="False"   
                                                      LogarithmicBase="10"
                                                      VisibleRange="0.01,5" 
                                                      DrawMinorGridLines="False"
                                                      DrawMajorGridLines="False">
                            </s:LogarithmicNumericAxis>
                        </s:SciChartSurface.XAxis>


                        <s:SciChartSurface.YAxis>
                            <s:NumericAxis  DrawMinorGridLines="False" 
                                            DrawMajorGridLines="False" 
                                            AxisAlignment="Left"
                                            VisibleRange="{Binding FftDroiteGaucheYAxisRange, UpdateSourceTrigger=PropertyChanged}"/>
                        </s:SciChartSurface.YAxis>

With XAxis VisibleRange set to “0.01,5” the graph looks like this:
enter image description here

When I change it to a bigger range say “0.01,11” or more FOR THE SAME DATA it gets deformed and looks like:
enter image description here

I tried removing VisibleRange in YAXis but it doesn’t seem to work. Please help.

0 votes
3k views

Hi,

I am looking for a way to bind the VisibleRange property, What I am doing is

<s:NumericAxis.VisibleRange>
     <s:DoubleRange Min="{Binding LowestValue, UpdateSourceTrigger=PropertyChanged}" Max="{Binding LowestValuePlusRange, UpdateSourceTrigger=PropertyChanged}"/>
 </s:NumericAxis.VisibleRange>

I get an error “A binding can not be set on the Min property of VisibleRange”.

Help me on how I should bind this please.

1 vote
2k views

Hi,

After the chart is added with data I want to switch between using the ZoomExtents method and manually setting the AutoRange = Never and setting the VisibleRange. It works using either of them, but after using the ZoomExtents method the axis range is never adjusted to the VisibleRange. Am I doing something wrong or is not possible ?

Using SciChart 3.1.0

Best regards
Marius

0 votes
3k views

Hi,

in a MVVM scenario, I bind the AnimatedVisibleRange to a property in the view model.

 <s:SciChartSurface SeriesSource="{Binding ChartSeries}">
   <s:SciChartSurface.XAxis>
     <s:NumericAxis AxisTitle="x" AnimatedVisibleRange="{Binding XVisibleRange, Mode=TwoWay}" AutoRange="Never" />
   </s:SciChartSurface.XAxis>
   <s:SciChartSurface.YAxis>
     <s:NumericAxis AxisTitle="y" AnimatedVisibleRange="{Binding YVisibleRange, Mode=TwoWay}" AutoRange="Never" />
   </s:SciChartSurface.YAxis>
   <s:SciChartSurface.ChartModifier>
     <s:ModifierGroup>
       <s:MouseWheelZoomModifier IsEnabled="True" XyDirection="XDirection"/>
     </s:ModifierGroup>
   </s:SciChartSurface.ChartModifier>
 </s:SciChartSurface>

Setting the XVisibleRange property in the view model smoothly animates the view. However, when I zoom in the chart with the mouse wheel, the view model property receives no updates (so the XVisibleRange property in the view model always stays on the value initially set by the view model).

The same thing works when I bind he VisibleRange instead of the AnimatedVisibleRange, i.e. in that case I get an update of the view model property on every mouse wheel zoom.

Is this intendend, or a bug? Building a workaround would require additional bindings, which I would like to avoid.

Best regards,

Andree

1 vote
4k views

I attached a scrollbar to a Y axis, and it is functioning as expected except for how it handles VisibleRange.

If my code sets the Y Axis VisibleRange to be smaller than the min/max extent of the data series, the scrollbar behaves as expected – the size of the scrollbar decreases, and I can use it to pan through the full VisibleRange.

However, if I set the VisibleRange to be larger than the min/max extent of the data series, the scrollbar resets the VisibleRange to the actual data series extent as soon as I grab it.

Can I disable this behavior?

I would expect the scrollbar to navigate within the current VisibleRange, and not modify it.

This is using v3.21.0.5511

  • wrlear asked 4 years ago
  • last active 4 years ago
1 vote
4k views

Hello,

I am now experimenting with SciChart (trail period).
I want to constantly draw the latest 300 points of a real time generated sine wave. I wrote a little program that tries to do this (attached). The sine wave is generated in the OnTimer function. I expected Draw_Limited_Range() function to draw the latest 300 points using XAxis.VisibleRange. Unfortunately this doesn’t work from OnTimer. Same function does work as expected when called from a button (Set VisableRange).
The output window of the debugger keeps displaying following message: A first chance exception of type ‘System.InvalidOperationException’ occurred in WindowsBase.dll

I tried this both on Ver 3.2 and 3.1; On 3.1 it crashes very fast.

What am I doing wrong?

Thanks,

Danny

0 votes
5k views

I’m trying to dynamically create chart surfaces and renderable series, but I’m having trouble binding one of the axes to another one, like you would do with this code in XAML:

<s:CategoryDateTimeAxis VisibleRange="{Binding ElementName=priceChart,
                                                                    Path=XAxis.VisibleRange,
                                                                    Mode=TwoWay}" />

I need to accomplish the same thing directly in C# but there are no methods related to binding at all. From the MSDN reference pages I’ve seen that any element that extends FrameworkElement has the Binding property, but it seems the axes don’t extend from that.

Could someone help me out in binding this axis to another axis (for the record, the other one is defined in XAML)?

0 votes
5k views

We were recently asked on priority support tickets ‘How do I ZoomExtents a SciChartSurface to a specific range, e.g. VisibleRangeLimit, when double clicking on the chart’.

For the benefit of our user-base our solution is below.

  • Andrew asked 4 years ago
  • last active 4 years ago
1 vote
5k views

I made an example based on the “Vertically Stacked Axes” from SciChart Examples. The main difference is that I can add DataSeries / YAxes on the fly.

The problem is that when I set VisibleRange and VisibleRangeLimit it does not crop the trace (as you can see on the Tan traces that are drawn on the whole surface).

Is there any way to crop the traces to VisibleRange of corresponding Axis?

  • Jan Kaiser asked 4 years ago
  • last active 4 years ago
1 vote
8k views

I want YAxis Auto Scale less than the value max 10% and greater value min 10%, how?

  • kingsoff asked 6 years ago
  • last active 4 years ago
Showing 19 results
This template supports the sidebar's widgets. Add one or use Full Width layout.