Pre loader

1

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

All Answers » Re: [cleaned]Padding axis ranges with AutoRange turned ON » Comments for "Re: [cleaned]Padding axis ranges with AutoRange turned ON"
  • dlee
    Thanks! This certainly does everything I need it to for the Y axis. But I don't see how I can use it to show only the most recent hour of data for the X axis. I am using the chart in real time so the series are receiving constant updates. The series is configured to only hold enough data points to show an hour's worth of data. The only problem I have is when the chart has been running for less than one hour as using Autorange shows only the range I have data for. Is this possible to do without updating the X axis programatically?
  • Andrew Burnett-Thompson
    Hello dlee, Are you using the DateTimeAxis or CategoryDateTimeAxis? If the DateTimeAxis, you will want to turn AutoRange off and set the XAxis.VisibleRange manually on each data-append. This is easy to do in the SciChartSurface.Rendered event. This will allow you override the VisibleRange immediately after the chart re-draws. Hope this helps! If you
  • dlee
    Thank you for your response Andrew. This is very similar to what I am doing currently. Except I am doing a RaisePropertyChanged on my RenderableSeries collection on a timer to update the X axis. I assume the rendered event is called as a byproduct of this. By your response I'm guessing that currently there is no way to set an axis range the way I want to without setting up some kind of timer and updating the axis through the program. Some kind of way to set a fixed window size would be a nice feature to have. Thanks again!
  • Shubha K
    Hello Andrew, I have a CategoryDateTimeAxis as my XAxis. There is a total of about 300 data points and setting VisibleRange of the axis between 0 and 100 using IndexRange. We are displaying the data using CandleStickSeries. We want some spacing between the last candle on the extreme right and the y axis which is set to Alignment.Right. I have tried to use Axis.GrowBy = new DoubleRange(0.1, 0.1). This does not seem to have any effect. I dont see any padding added between the last candle and the Y-Axis. Is there something different that needs to be done to achieve this? On a general note, setting MinorDelta, MajorDelta has been a challenge for CategoryDatetime axis. Please advise. Thank you! Copying the code here.. Dim datetimeaxis = New CategoryDateTimeAxis() datetimeaxis.VisibleRange = New IndexRange(0, 200) datetimeaxis.DrawMajorBands = False datetimeaxis.DrawMinorGridLines = False datetimeaxis.DrawMajorGridLines = False datetimeaxis.Padding = New Thickness(2) datetimeaxis.GrowBy = New DoubleRange(0.02, 0.02) datetimeaxis.Scrollbar = scrollbar m_chart.XAxis = datetimeaxis
  • Andrew Burnett-Thompson
    GrowBy is used in our examples with CategoryDateTimeAxis to create padding on the right. Please see https://www.scichart.com/wpf-chart-example-realtime-ticking-stock-charts/ which sets XAxis.GrowBy to new DoubleRange(0, 0.1)
  • Torok Brigitta
    Hi Andrew, I am trying to use CategoryDateTimeAxis on XAxis and I don’t understand why it’s not working as expected. My code looks like this: XAxis.GrowBy = new DoubleRange(0, 0.1); XAxis.DrawMinorGridLines=false; XAxis.DrawMajorBands = true; XAxis.Padding = new Thickness(2); . The problem is that all the data series are aligned on the same x axis. There is no space between them. Is there something that I need to set in order to know the distance between two data series? Thank you.
  • Andrew Burnett-Thompson
    Maybe open a new forum question with the exact steps to reproduce and expected vs. Actual results?

Try SciChart Today

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

Start TrialCase Studies