Right now i’m using trial version but i’m looking forward to buy full version as to integrate the charts in my app . I am building an real time chart that update data according to time , which means simply i need Time on the x axis and numeric values on the y axis , but i’m not getting any hint how to get the time values on the x axis .
- Abhishek Sadana asked 9 years ago
- You must login to post comments
Hi Alex
Clamping Axis.Visiblerange
in SciChart WPF can be achieved with a VisibleRangeChanged
event handler
Take a look at Clipping the Axis.VisibleRange on Zoom and Pan
Clipping Axis.VisibleRange in Code To clip the VisibleRange and force a certain maximum or minimum, just use the following code:
axis.VisibleRangeChanged += (s, e) => { // e is VisibleRangeChangedEventArgs // Assuming axis is NumericAxis if (e.NewVisibleRange != null && e.NewVisibleRange.Min < 0) { // Force minimum visiblerange to zero always ((NumericAxis)sender).VisibleRange = new DoubleRange(0, e.NewVisibleRange.Max); } };
There are other methods in there such as using VisibleRangeLimit
but these have their limitations (no pun intended), such as not clamping when user zoom/pan occurs
- Andrew Burnett-Thompson answered 9 years ago
- last edited 1 month ago
- Actually here we are adding static data in this , but i need to show only current time like as “hh:mm” on x-axis , or is there any way we can add string values on the x-axis as i can parse the current time in string format after that i’ll append in series.
- I would think you can simply set the DateAxis.TextFormatting to allow the string to be formatted as hh:mm. Try calling dateAxis.setTextFormatting(“hh:mm”) with a Java date format string . For advanced string formatting there is a feature called LabelProvider which will allow strings on an axis. AxisBase.setLabelProvider(new CustomLabelProvider()) where CustomLabelProvider inherits LabelProviderBase https://www.scichart.com/documentation/android/v1.x/webframe.html#SciChart.Charting~com.scichart.charting.numerics.labelProviders.LabelProviderBase.html
- Scroll and update time on X axis and value on Y axis
- Xaxis shows 5:30 constant no changes
- You must login to post comments
Please login first to submit.