SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

0 votes
405 views

Hello SciChart Team,

I was facing a problem lately and would like to know if you can reproduce it or maybe if you have fixed it in the latest version already.

I have created a chart with a X axis using DateTime as format. When I use the RolloverModifier in combination with Interpolation I get an ArgumentOutOfRangeException when moving the cursor to the Y Axis (see attached image).

I have attached the full excetption details as well.

I am looking forward to your feedback.

Thanks and best regards
Stefan

SciChart Version: 5.4.0.12119
SciChart Runtime Version: v4.0.30319


System.ArgumentOutOfRangeException was unhandled Message: An unhandled
exception of type 'System.ArgumentOutOfRangeException' occurred in
WindowsBase.dll Additional information: Ticks must be between
DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks.


System.ArgumentOutOfRangeException: Ticks must be between DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks.
Parameter name: ticks
   at System.DateTime..ctor(Int64 ticks)
   at A.ARB.Subtract(DateTime a, DateTime b)
   at SciChart.Charting.Model.DataSeries.DataSeries2.FindClosestLine(IComparable x, IComparable y, Double xyScaleRatio, Double xRadius, LineDrawMode drawNanAs)
   at SciChart.Charting.Visuals.RenderableSeries.BaseRenderableSeries.NearestHitResult(Point mouseRawPoint, Double hitTestRadiusInPixels, SearchMode searchMode, Boolean considerYCoordinateForDistanceCalculation)
   at SciChart.Charting.Visuals.RenderableSeries.BaseRenderableSeries.HitTestInternal(Point rawPoint, Double hitTestRadius, Boolean interpolate)
   at SciChart.Charting.Visuals.RenderableSeries.BaseRenderableSeries.HitTest(Point rawPoint, Double hitTestRadius, Boolean interpolate)
   at SciChart.Charting.Visuals.RenderableSeries.BaseRenderableSeries.VerticalSliceHitTest(Point rawPoint, Boolean interpolate)
   at SciChart.Charting.ChartModifiers.RolloverModifier.GWB(Point D)
   at SciChart.Charting.ChartModifiers.RolloverModifier.BY.MoveNext()
   at SciChart.Charting.Common.Extensions.EnumerableExtensions.RU.MoveNext()
   at SciChart.Core.Extensions.EnumerableExtensions.ForEachDo[T](IEnumerable1 enumerable, Action1 operation)
   at SciChart.Charting.ChartModifiers.RolloverModifier.FillWithIncludedSeries(IEnumerable1 infos, ObservableCollection1 seriesInfos)
   at SciChart.Charting.ChartModifiers.RolloverModifier.HandleMasterMouseEvent(Point mousePoint)
   at SciChart.Charting.ChartModifiers.InspectSeriesModifierBase.TUB(Point D)
   at SciChart.Charting.ChartModifiers.InspectSeriesModifierBase.HandleMouseEvent(ModifierMouseArgs e)
   at SciChart.Charting.ChartModifiers.InspectSeriesModifierBase.OnModifierMouseMove(ModifierMouseArgs e)
   at SciChart.Charting.ChartModifiers.ModifierGroup.<>c.OB(IChartModifier D, ModifierEventArgsBase I)
   at SciChart.Charting.ChartModifiers.ModifierGroup.FTB(Action2 D, ModifierEventArgsBase I)
   at SciChart.Charting.ChartModifiers.ModifierGroup.OnModifierMouseMove(ModifierMouseArgs e)
   at SciChart.Core.Utility.Mouse.MouseManager.UB(ModifierMouseArgs D, IReceiveMouseEvents I, Boolean J)
   at SciChart.Core.Utility.Mouse.MouseManager.ZDB.M(IReceiveMouseEvents D)
   at SciChart.Core.Extensions.EnumerableExtensions.ForEachDo[T](IEnumerable1 enumerable, Action1 operation)
   at SciChart.Core.Utility.Mouse.MouseManager.JB(IReceiveMouseEvents D, ModifierMouseArgs I, Action3 J)
   at SciChart.Core.Utility.Mouse.MouseManager.GB(IPublishMouseEvents D, IReceiveMouseEvents I, MouseEventArgs J, MouseButtons M, Action3 O)
   at SciChart.Core.Utility.Mouse.MouseManager.AEB.T(Object D, MouseEventArgs I)
   at A.LEB.S(MouseEventArgs D)
   at A.LEB.M(Object D, MouseEventArgs I)
   at System.Windows.Input.MouseEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at System.Windows.Application.Run()
   at XXX.App.Main()
   at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()
  • Stefan Ott asked 5 months ago
  • last active 4 months ago
1 vote
0 answers
400 views

Hi
I have a chart from a sound.
In xiaomi phones when resume chart after pause it, my line chart faces the severe lag.
In other phones my chart work well.
what should I do?
phone is (Xiaomi mi a3)

private void resume() {

    forceRunInPauseMode = true;
    mediaPlayer.seekTo(currentTime);
    mediaPlayer.start();
    completedState = false;
    pauseState = false;
    updateChart();
}



private void updateChart() {
    schedule = scheduledExecutorService.scheduleWithFixedDelay(() -> {
        if (mediaPlayer.isPlaying() || forceRunInPauseMode){
            UpdateSuspender.using(binding.sciChart, mRunnable);
        }
    }, 0, TIME_INTERVAL, TimeUnit.MILLISECONDS);

}

private Runnable mRunnable = new Runnable() {
    @Override
    public void run() {
        forceRunInPauseMode = false;


        currentTime = mediaPlayer.getCurrentPosition();
        currentRange = currentTime * 2;
        getActivity().runOnUiThread(()->binding.tvCurrentDuration.setText(MiliToTimeConverter.milliToTime(currentTime)));

        if (currentRange < 0)
            currentRange = 0;
        else if (currentRange > xDoubleArray.length - 1)
            currentRange = xDoubleArray.length - 1;

        if (!drawed) {
            DoubleValues xValues = new DoubleValues(Arrays.copyOfRange(xDoubleArray, 0, xDoubleArray.length-1));
            DoubleValues yValues = new DoubleValues(Arrays.copyOfRange(yDoubleArray, 0, yDoubleArray.length-1));
            DoubleSeries doubleSeries = new DoubleSeries(xValues, yValues);
            lineData.append(doubleSeries.getxValues(), doubleSeries.getyValues());
            drawed = true;
        }
        xVisibleRange.setMinMax((double) (currentRange - visibleInterval / 2), (double) (currentRange + visibleInterval / 2));
    }
};
0 votes
411 views

I am creating a chart that uses an XML file that holds data in a tabular format (headers and rows) that i covert to a datatable of strings and then try to convert each column/row value to a double to populate an XYDataSeries object. Sometimes the amount of data is very large which can take 10-15 seconds to process, which is not ideal for the application it is used in.

What i would like to do is create placeholder XYDataSeries that have a series name and dynamically create the data and YAxis when the series is selected initially from the legend.

Is this possible? I have tried in the past but have issues with the data being null.

0 votes
0 answers
372 views

I need z data in DataSeries using LineAnnotation.

Note:
Z data of blue areas 0
Z data of green areas 50

Any help? Thank you.

0 votes
381 views

I’m trying to export a surface to an image running this simple line of code:

SciChartSurface.ExportToBitmapSource(false, null);

and it works, but the size of exported image is not good enough for me, so I’m trying this line of code:

SciChartSurface.ExportToBitmapSource(false, size);

But that’s what I’m getting:

System.Windows.Markup.XamlParseException: ''No matching constructor found on type 'SciChart.Charting.Model.ChartData.XySeriesInfo'. You can use the Arguments or FactoryMethod directives to construct this type.' Line number '1' and line position '1884'.'

I would appreciate any help,

Thank you.

0 votes
394 views

I want to modify the format of XAxis Label of example “MultiPaneStockCharts”, so I do this:

<s:SciStockChart.XAxisStyle>
                            <Style TargetType="s:CategoryDateTimeAxis">

                                <!--added the format here, but does not work-->
                                <Setter Property="TextFormatting" Value="yyyy-MM-dd"/>

                                <Setter Property="DrawMajorBands" Value="True" />
                                <Setter Property="DrawMinorGridLines" Value="False" />
                                <Setter Property="VisibleRange" Value="{Binding ParentViewModel.XVisibleRange, Mode=TwoWay}" />
                                <Setter Property="GrowBy" Value="0, 0.05" />
                            </Style>
                        </s:SciStockChart.XAxisStyle>

But the format of the XAxis labels are not modified as I want it. It seems that something inside the example is preventing format setting, since in different zoom rate the label format is changing.

How can I modify the format?

Thank you.

  • xing king asked 5 months ago
  • last active 5 months ago
0 votes
384 views

Hi,

to draw a stock bar, the open-close width are auto set according to zoom, which is okay. But the highest-lowest line in the middle of a stock candlestick is too thin.

I’ve been searching for a way to increase the width of the highest-lowest line, but neither the showcases nor the forum provides a solution.

Any help? Thank you.

  • xing king asked 5 months ago
  • last active 5 months ago
0 votes
386 views

i am tried to use this code in window.cs file …it is not showing any output. kindly let me know the steps what i have to do for getting output

// Create the chart surface
var sciChartSurface = new SciChartSurface();

// Create the X and Y Axis
var xAxis = new NumericAxis() { AxisTitle = "Number of Samples (per series)"};
var yAxis = new NumericAxis() { AxisTitle = "Value"};

sciChartSurface.XAxis = xAxis;
sciChartSurface.YAxis = yAxis;

// Specify Interactivity Modifiers
sciChartSurface.ChartModifier = new ModifierGroup(new RubberBandXyZoomModifier(), new ZoomExtentsModifier());
// Add annotation hints to the user
var textAnnotation = new TextAnnotation()
{
   Text = "Hello World!",
   X1=5.0,
   Y1=5.0
};
sciChartSurface.Annotations.Add(textAnnotation);
  • cse dbmt asked 5 months ago
  • last active 5 months ago
0 votes
478 views

I’m getting the following crash:

2020-02-14 16:45:43.902812-0500 CommonStock Development[2425:710225] -[SCIRolloverModifier onTouchesCancelled:]: unrecognized selector sent to instance 0x282ffe080
2020-02-14 16:45:43.904098-0500 CommonStock Development[2425:710225] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[SCIRolloverModifier onTouchesCancelled:]: unrecognized selector sent to instance 0x282ffe080’

whenever I try to scrub my chart, I must also note that in order for the legend to show, I have to tap really hard on the surface.

This is my code:

func set(data set: SimpleChartDataSet, alternate: SimpleChartDataSet) {

    let lineDataSeries = SCIXyDataSeries(xType: .double, yType: .double)
    let dashedDataSeries = SCIXyDataSeries(xType: .double, yType: .double)

    let group = DispatchGroup()
    group.enter()

    DispatchQueue.global(qos: .userInteractive).async {
        for (index, i) in set.enumerated() {
            lineDataSeries.append(x: Double(index), y: Double(i))
        }

        for (index, i) in alternate.enumerated() {
            dashedDataSeries.append(x: Double(index), y: Double(i))
        }

        group.leave()
    }

    group.notify(queue: .main) {

        let lineSeries = SCIFastMountainRenderableSeries()
        lineSeries.zeroLineY = set.min() ?? 0.0
        lineSeries.dataSeries = lineDataSeries
        lineSeries.strokeStyle = SCISolidPenStyle(color: UIColor.green, thickness: 2.0)
        lineSeries.areaStyle =  SCILinearGradientBrushStyle(start: CGPoint(x: 0, y: 1), end: CGPoint(x: 0, y: 0), start: UIColor.green, end: UIColor.clear)

        let dashedSeries = SCIFastLineRenderableSeries()
        dashedSeries.zeroLineY = set.min() ?? 0.0
        dashedSeries.dataSeries = dashedDataSeries
        dashedSeries.strokeStyle = SCISolidPenStyle(color: UIColor.white, thickness: 2.0, strokeDashArray: [2.0,2.0,2.0,2.0])

        SCIUpdateSuspender.usingWith(self.surface) {

            self.surface.xAxes.clear()
            self.surface.yAxes.clear()
            self.surface.renderableSeries.clear()

            let xAxis = SCINumericAxis()
            xAxis.drawLabels = false
            xAxis.drawMajorBands = false
            xAxis.drawMajorGridLines = false
            xAxis.drawMinorGridLines = false
            xAxis.drawMinorTicks = false
            xAxis.drawMajorTicks = false
            xAxis.drawLabels = false

            let yAxis = SCINumericAxis()
            yAxis.drawLabels = false
            yAxis.drawMajorBands = false
            yAxis.drawMajorGridLines = false
            yAxis.drawMinorGridLines = false
            yAxis.drawMinorTicks = false
            yAxis.drawMajorTicks = false
            yAxis.drawLabels = false

            self.surface.xAxes.add(items: xAxis)
            self.surface.yAxes.add(items: yAxis)
            self.surface.renderableSeries.add(items: lineSeries, dashedSeries )
            self.surface.chartModifiers.add(SCIRolloverModifier())
        }
    }
}
0 votes
407 views

(WPF) I am confused about the difference among Rollover tooltip, Cursor tooltip and Tooltip. In CustomTooltipsWithModifiers.xaml in example suite, it has all of them, I can see they have different styles, but not sure when to use which. Please advise. Thanks.

  • sally an asked 5 months ago
  • last active 5 months ago
0 votes
439 views

I was testing my charts on a simulator and when I naved away and then back to the chart screen the Simulator’s chart was totally black screen; I could move the mouse over the points and the popouts would occur; and your license notice showed in the center of the chart. So it was almost like it thought all the drawing for the chart itself needed to be black on black.

It was always broken on the 2nd or later chart. Restarting the app fixed it. I tried removing all custom settings, and calling the invalidate; and nothing caused it to redraw correctly… Fortunately, when deploying to real devices everything worked correctly. Is this an expected side effect of testing on a simulator, or is their something that I can do to force a hard refresh of the chart…

FYI: The additional debug diagnostics don’t seem to do anything on a simulator, or at least I couldn’t find anywhere it was logged.

0 votes
473 views

This might be a stupid question. 😀 But I tried several things and nothing seems to work…

I have a chart that has several different datasets that can be switched to. When I apply them and do zoom to extents it changes the Y Axis sometimes 1-15, sometimes 1-20, sometimes 1-25. So the chart zooms in/out, which looks nice.

However I would like to fix the initial zoom to be always be 1-20. If the chart is smaller or bigger than 20; that is fine; I just want the initial viewport to always zoom to be 1-20, when I switch the dataset. They can then zoom in/out or pan using gestures.

Any ideas on what API I need to call to zoom the chart to 1-20. (Please note, this is using a logarithmic scale on the Y-Axis — if it makes any differences).

So what do I need to call/set rather than calling the zoom to extents function.

0 votes
456 views

Hi,

I have a fast column renderable series where a column is added each hour. When the first column is added, it renders approximately half the graph (regardless of zoom), which is unintended. Once the data point for the second hour is added, the column collapses down to the space of the hour (as we would want). Why is the first column rendering too wide? Am I failing to set a parameter that is required?

Below is my series setup:

 val uoColumnSeries =
        generateColumnRenderableSeries(LABEL_ID_UO, uoColumnDataSeries, SolidBrushStyle(uoColumnColor))
    uoColumnSeries.dataPointWidth = .95
    uoRenderableSeries.add(uoColumnSeries)

Attached is how the data renders with 1 point (zoomed in and out), and data render once second point (of height 0) is added. The graph in question is the column graph at the top in yellow.

Thanks,
-Andy

0 votes
419 views

I want add some line series my with mouse. Left click down for start, move mouse to draw line and mouse up to finish. The problem, that SciChartSurface do not raise MouseDown event ever. And another issue get mouse position according axis values.

What the best way draw line series with mouse?

1 vote
446 views

I found the example for spline drawing, but it’s still missing the gradient brush that mountain series have, how can I add it? thanks

0 votes
473 views

This is stackTrace:
E/Axis: VisibleRange was restored to its last valid value. The range class com.scichart.data.model.DoubleRange (Min = 27748.0, Max = 32248.0) either is not valid or it doesn’t satisfy MinimalZoomConstrain or MaximumZoomConstrain. To provide fallback value please override AxisCore#coerceVisibleRange(IRange) method

0 votes
388 views

Hi! I have an overview control, which uses 2-way binding for the x-axis visible range. I actually followed the WPF Realtime Ticking Stock Charts example, the only difference is that I have a line chart with DateRange x-axis. Everything works, except that the overview’s x-axis maximum visible range is not the same as the actual chart’s visible range. Normally the chart is rolling and the maximum x visible range is always ahead of the latest data, just as it’s in the stock chart example. However, the overview’s x visible range always matches the latest x-axis value of the data. So when the overview’s grip is used to scale the x-axis to go back in time, the chart’s x-axis maximum visible range always jumps to match the latest x-axis value of the data and the chart stops rolling. I just don’t get what am I doing wrong or am I missing something? Please see the attached screenshot and the source code. I’m evaluating SciChart to see if it fits our needs before we’d make a purchase and this is something that should work.

Chart Xaml:

<s:SciChartSurface Grid.Row="0" x:Name="Chart" RenderableSeries="{s:SeriesBinding SeriesViewModels}">
            <!--  Create an X Axis  -->
            <s:SciChartSurface.XAxis>
                <s:DateTimeAxis AxisTitle="Time" VisibleRange="{Binding XVisibleRange, Mode=TwoWay}" GrowBy="0, 0.1" DrawMinorGridLines="False" DrawMajorBands="True"/>
            </s:SciChartSurface.XAxis>
            <!--  Create a Y Axis  -->
            <s:SciChartSurface.YAxis>
                <s:NumericAxis AxisTitle="Count" AutoRange="Always" GrowBy="0.1"/>
            </s:SciChartSurface.YAxis>
            <!--  Specify interactivity modifiers  -->
            <!-- Add Zooming, Panning behaviours to the chart -->
            <s:SciChartSurface.ChartModifier>
                <s:ModifierGroup>
                    <!-- Allow drag to zoom on Left mouse -->
                    <s:RubberBandXyZoomModifier ExecuteOn="MouseLeftButton"
                                                         RubberBandFill="#33FFFFFF" RubberBandStroke="#AAFFFFFF"
                                                         RubberBandStrokeDashArray="2 2"/>
                    <!-- Allow pan on Right mouse drag -->
                    <s:ZoomPanModifier ExecuteOn="MouseRightButton" ClipModeX="None" />
                    <!-- Allow Dragging YAxis to Scale -->
                    <s:YAxisDragModifier DragMode="Scale"/>
                    <!-- Allow Dragging XAxis to Pan -->
                    <s:XAxisDragModifier DragMode="Pan"/>
                    <!-- Allow Mousewheel Zoom -->
                    <s:MouseWheelZoomModifier/>
                    <!-- Allow Zoom to Extents on double click -->
                    <s:ZoomExtentsModifier ExecuteOn="MouseDoubleClick"/>
                    <!-- Add a RolloverModifier to the chart (shows vertical line tooltips) -->
                    <s:RolloverModifier ExecuteOn="MouseMove" ShowTooltipOn="MouseHover"/>
                </s:ModifierGroup>
            </s:SciChartSurface.ChartModifier>
        </s:SciChartSurface>
        <!-- Add a Scrollbar, and bind to SciChartSurface.XAxis -->
        <Grid Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <!--<ColumnDefinition Width="75"/>-->
            </Grid.ColumnDefinitions>
            <!--<s:SciChartScrollbar Grid.Column="0" Axis="{Binding ElementName=Chart, Path=XAxis}"/>-->
            <s:SciChartOverview Grid.Column="0"
                                DataSeries="{Binding SeriesViewModels[0].DataSeries, Mode=OneWay}"
                                ParentSurface="{Binding Source={x:Reference Name=Chart}, Mode=OneWay}"
                                SelectedRange="{Binding XVisibleRange, Mode=TwoWay}"/>
        </Grid>

View model:

private DateRange _xVisibleRange;
public DateRange XVisibleRange
{
        get => _xVisibleRange;
        set => SetProperty(ref _xVisibleRange, value);
}

// after appending new data
var LatestXValue = DataSeries.XValues.Last();
var MaxXVisRange = XVisibleRange.Max;

if (MaxXVisRange > LatestXValue)
{
        var existingRange = _xVisibleRange;
        var newRange = new DateRange(existingRange.Min.AddSeconds(rollBySeconds), existingRange.Max.AddSeconds(rollBySeconds));
        XVisibleRange = newRange; 
        // the overview doesn't have this range, despite of two-way binding
        // it has the latest x-axis value as max visible range
}
0 votes
355 views

In example https://www.scichart.com/example/wpf-chart-example-stacked-column-side-by-side/ there is a LabelProvider with hardcoded labels. How can I bind it to a collection of Labels?

0 votes
386 views

Hi
I have a fifo scrolling chart
When I set the axis visibleRangeListener, the chart performance goes down and it gets an exception.
what is the solution?

0 votes
510 views

Hi,

I’m creating lines chart with data from CSV file.
I have multiple series and each serie has its own YAxis.
As it comes from different CSV files, the number of series and their names are not known in advance.

I create the series in the code (MVVM) .

I’m using the trial version for 2 weeks now and before I purchase the licence, I have two questions:

1) I need to implement a function allowing the user to create multiple VerticalSliceModifier and display data for each serie on the graph and store data to a list or datatable.

Is it possible to have Vertical Slice Tooltip with multiple YAxis ?
If I create a vertical line annotation, can I get data for each serie crossing the line?

2) I need to be able to add annotation dynamically (measure, text, box, lines…).
Is there a way to save annotations to a list (and then to a file) so that if the user reopens the same CSV file he can load and display the corresponding annotations?

Thank you in advance for your answer,
Regards
Nicolas

0 votes
454 views

Hello,
On my SciChartSurface, we’re processing real-time data so the chart is always moving. I noticed that when I do a single left-click anywhere on the chart, it changes the ZoomState property from AtExtents to UserZooming.

Is there a way to prevent this?

I was hoping the MinDragSensitivity on the RubberBandXyZoomModifier would handle that but it doesn’t seem to care.

You can reproduce this by using the Drag Area to Zoom example and viewing the ZoomState of the SciChartSurface after you single click on the chart.

What I’m looking for is a way to only change the ZoomState to UserZooming if the MinDragSensitivity has been met.

Thanks in advance.

0 votes
448 views

Hello! I have a real time line chart and a SciChartOverview control and the problem is, as soon as I want to extend the visible range with the overview’s slider, the chart’s x visible range is zoomed to extent. I’d like to have the same functionality as in the ScrollChartUsingOverviewControl example and the real time ticking stock chart. In those examples, if the visible range is extended by the overview scroll bar’s left-hand slider, the max visible range keeps rolling with new data, while the min visible range is extended. I followed those examples, by binding the XVisibleRange to the view model in 2 way mode, but for me the max visible range jumps to the latest data as soon as I move the overview’s slider to the left (stops rolling with new data).

Chart xaml:

<s:SciChartSurface Grid.Row="0" x:Name="Chart" RenderableSeries="{s:SeriesBinding SeriesViewModels}">
            <!--  Create an X Axis  -->
            <s:SciChartSurface.XAxis>
                <s:DateTimeAxis AxisTitle="Time" VisibleRange="{Binding XVisibleRange, Mode=TwoWay}" GrowBy="0, 0.1" DrawMinorGridLines="False" DrawMajorBands="True"/>
            </s:SciChartSurface.XAxis>
            <!--  Create a Y Axis  -->
            <s:SciChartSurface.YAxis>
                <s:NumericAxis AxisTitle="Count" AutoRange="Always" GrowBy="0.1"/>
            </s:SciChartSurface.YAxis>
            <!--  Specify interactivity modifiers  -->
            <!-- Add Zooming, Panning behaviours to the chart -->
            <s:SciChartSurface.ChartModifier>
                <s:ModifierGroup>
                    <!-- Allow drag to zoom on Left mouse -->
                    <s:RubberBandXyZoomModifier ExecuteOn="MouseLeftButton"
                                                         RubberBandFill="#33FFFFFF" RubberBandStroke="#AAFFFFFF"
                                                         RubberBandStrokeDashArray="2 2"/>
                    <!-- Allow pan on Right mouse drag -->
                    <s:ZoomPanModifier ExecuteOn="MouseRightButton" ClipModeX="None" />
                    <!-- Allow Dragging YAxis to Scale -->
                    <s:YAxisDragModifier DragMode="Scale"/>
                    <!-- Allow Dragging XAxis to Pan -->
                    <s:XAxisDragModifier DragMode="Pan"/>
                    <!-- Allow Mousewheel Zoom -->
                    <s:MouseWheelZoomModifier/>
                    <!-- Allow Zoom to Extents on double click -->
                    <s:ZoomExtentsModifier ExecuteOn="MouseDoubleClick"/>
                    <!-- Add a Legend to the chart -->
                    <s:LegendModifier ShowLegend="True" Orientation="Horizontal"
                                               VerticalAlignment="Bottom"                                     
                                               HorizontalAlignment="Center"
                                               LegendPlacement="Inside" />
                    <!-- Add a RolloverModifier to the chart (shows vertical line tooltips) -->
                    <s:RolloverModifier ExecuteOn="MouseMove" ShowTooltipOn="MouseHover"/>
                </s:ModifierGroup>
            </s:SciChartSurface.ChartModifier>
        </s:SciChartSurface>
        <!-- Add a Scrollbar, and bind to SciChartSurface.XAxis -->
        <Grid Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <!--<ColumnDefinition Width="75"/>-->
            </Grid.ColumnDefinitions>
            <!--<s:SciChartScrollbar Grid.Column="0" Axis="{Binding ElementName=PhotonChart, Path=XAxis}"/>-->
            <s:SciChartOverview Grid.Column="0"
                                DataSeries="{Binding SeriesViewModels[0].DataSeries, Mode=OneWay}"
                                ParentSurface="{Binding Source={x:Reference Name=Chart}, Mode=OneWay}"
                                SelectedRange="{Binding XVisibleRange, Mode=TwoWay}"/>
        </Grid>

Am I missing something, or what am I doing wrong?

1 vote
417 views

Originally my chart would
– create the surface
– setup the chart modifiers
– setup the axis
– add the data (SCIFastLineRenderableSeries).

However, it appears that when you .add(new SCIFastLineRenderableSeries) it recreates all the tooltips on each add, and finally on the very last SCIFastLineRenderableSeries that is inserted will get two duplicate tooltips. This happens both with the default tooltips or custom tooltips.

I finally noticed that some of your examples you setup the modifiers at the end after adding the data. So I moved all the chart modifiers into a separate function and called it after the data is setup, and now the proper number of tooltips appears.

This might either need to be noted somewhere prominent in the iOS docs; or even better the order shouldn’t matter.

1 vote
509 views

I didn’t see anything in any docs, so I am just wanting to verify this info…

Is this correct that you have to link in and ship the libSwiftCore (+ other swift libs) with an app using SciCharts on iOS? When I added the chart library to my app; the app crashed at startup with missing dynamic load of libSwiftCore.dylib on a real device (emulators run fine).

Enabling ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES in the build settings fixed this issue. But this surprised me that the SciChart library would actually require Swift.

Was this intentional; or did the library somehow pickup an unintentional reference somewhere….

0 votes
393 views

I don’t know if this affects any earlier versions; but the version my app is using is the 5098.

I created a surface with the following modifiers:
– SCIZoomPanModifier
– SCIZoomExtentsModifier
– SCIPinchZoomModifier

On the SCIZoomExtentsModifier I have **SCIDirection2D_XyDirection ** (also tried YDirection alone)
And when you double tap on the display; only the X direction resizes back down to the proper size. The Y direction is 100% ignored.

Seems to have to do with using a SCILogarithmicNumericAxis on the Y axis. I have tried commenting out all settings applied to the SCILogarithmicNumericAxis; and no change in the ability to re-zoom back to normal size. If I use a SCINumericAxis instead; the Y zooms back out properly…

0 votes
441 views

I want to put a vertical line in the middle of the surface and chart.
this line is fixed .

0 votes
485 views

Hello Sci Chart support!

I am attempting to apply a low pass filter to a FIFO chart. I have implemented the FilterAll() function successfully but I was wondering if there are examples on how to override the FilterOnAppend() function or how to make FilterAll() work for a FIFO chart.

Currently, when calling the FilterAll() method the program throws an invalid operation exception:

System.InvalidOperationException: ‘Data has been Appended to a DataSeries which is unsorted in the X-Direction. Unsorted data can have severe performance implications in SciChart.
For maximum performance, please double-check that you are only inserting sorted data to SciChart. Alternatively, to disable this warning and allow unsorted data, please set DataSeries.AcceptsUnsortedData = true. For more info see Performance Tips and Tricks at https://www.scichart.com/documentation/v4.x/webframe.html#Performance_Tips_&_Tricks.html

I do not want to allow unsorted data because I know it is not a good practice and even if allowing unsorted data, the chart stops updating after a few seconds.

It may be worth knowing that I am sampling data from a National Instruments’ data acquisition board. Sci Chart is helping me display this data, but I would like to display the filtered data as it is being queued.

If you could help me with this matter I would appreciate it!
Best,
Paola

1 vote
432 views

Hi SciChart team,

there is a working example that implement a Polar Chart type for iOS?
I was unable to find anything in the documentation. Only for WPF platform.
If not, there is a plan to support this kind of chart in next release of the library?

Thanks for the help.

0 votes
444 views

Hi,

How can i get to first and last items indexes on visible range when onVisibleRangeChanged triggered?

Tnx.

0 votes
392 views

hello, i have an exception.
see the try catch

public class CategoryDateTimeAxisEx : CategoryDateTimeAxis
{
    public override IComparable GetDataValue(double pixelCoordinate)
    {
        var dataValue = DateTime.MinValue;

        var coordCalc = GetCurrentCoordinateCalculator();
        if (coordCalc != null)
        {
            // Returns the index of a dataPoint, need to transform it to a dataValue
            var value = coordCalc.GetDataValue(pixelCoordinate);

            var catCoordCalc = coordCalc as ICategoryCoordinateCalculator<DateTime>;
            try
            {
                dataValue = catCoordCalc?.TransformIndexToData((int)value) ?? value.ToDateTime();
            }
            catch (Exception e)
            {
                 //TransformIndexToData() throw exception because catCoordCalc.BaseXValues is null,
                 //it only happend when my mouse over SciSurface and move faster on app startup
            } 
        }
        return dataValue;
    }
}

I use this class and override function now, it can work .but i don’t like this way.

0 votes
516 views

We have a chart where we’re loading data in every second. If you don’t zoom in, the Overview/scrollbar control that we have beneath the chart stays to the right and keeps showing the most recent. However, once you zoom in and then call ZoomExtents() on the chart, it will zoom out but the Overview/scrollbar doesn’t go back to showing the latest; the max is stuck at whatever the time was when you called the ZoomExtents().

If I have the ZoomExtentsModifier on a chart and double-click, it does what I want so that’s what I’m trying to replicate without having the modifier enabled.

0 votes
0 answers
421 views

As of now ,when i tried to build line chart using realtime data ,by default i m getting square wave form but i want like linear gradient close to look like ventilator graph.

if any one have implemented that before then please help as i m new to this library.

-2 votes
0 answers
452 views

As of now ,when i tried to build line chart using realtime data ,by default i m getting square wave form but i want like linear gradient close to look like ventilator graph.

if any one have implemented that before then please help as i m new to this library.

0 votes
465 views

The following code works just fine in SciChart 3.3, 3.6. Since 4.2.5 up to 6.0 it does not show a line any more, even if you pinch zoom into the chart.

Width values of 1,2,3,4 do not work regardless of screen resolution.

I used the same XAML in 3.3.0 and 4.2.5 – screenshots in attachment. I cannot access 3.6 any more (separate forum post), however I have an old version of my customer project and it worked there too. This seems to have become broken since 4.x.

        <SciChart:SciChartSurface.Annotations>
              <SciChart:VerticalLineAnnotation 
                      X1="{Binding Dummy}"
                      Width="1">
                  <SciChart:AnnotationLabel Text="{Binding DummyText}"/>
              </SciChart:VerticalLineAnnotation>
          </SciChart:SciChartSurface.Annotations>
  
0 votes
0 answers
387 views

I have a license for SciChart 5.1 and 3.6. I cannot access the 3.6 versions any more from NuGet, they seem to have disappeared.

0 votes
507 views

I have a license for SciChart 5.1 and 3.6. I cannot access the 3.6 versions any more from NuGet, they seem to have disappeared.

0 votes
511 views

NativeScript tends to replace fragments rather than destroy the entire activity; so everything lives in a single activity. Unfortunately; when navigating pages the fragment might not be fully detached while the other one is being added (for animation purposes) and it throws this error:

Stacktrace
System.err: Attempt to invoke virtual method ‘void com.scichart.drawing.opengl.ao.a(int, int)’ on a null object reference
System.err:
System.err: StackTrace:
System.err: java.lang.NullPointerException: Attempt to invoke virtual method ‘void com.scichart.drawing.opengl.ao.a(int, int)’ on a null object reference
System.err: at com.scichart.drawing.opengl.aa.doFrame(SourceFile:88)
System.err: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:909)
System.err: at android.view.Choreographer.doCallbacks(Choreographer.java:723)
System.err: at android.view.Choreographer.doFrame(Choreographer.java:655)
System.err: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
System.err: at android.os.Handler.handleCallback(Handler.java:790)
System.err: at android.os.Handler.dispatchMessage(Handler.java:99)
System.err: at android.os.Looper.loop(Looper.java:164)
System.err: at android.app.ActivityThread.main(ActivityThread.java:6494)
System.err: at java.lang.reflect.Method.invoke(Native Method)
System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

I have tried using suspendUpdates on the surface to stop any updates; and finally went to where I have to manually remove it from the viewport before destruction occurs.

Is their any way to potentially catch this error and ignore it. It only happens during a destruction sequence that the SciChart doesn’t like. Or is their some way to stop all drawing so that it isn’t trying to call whatever is in SourceFile line 88

Also is their a better place to report stack traces for crashes?

0 votes
0 answers
430 views

Is there a way to add grip handles to the left-center and right-center of a box annotation. By default, grip handles are only created on the four corners of the box. See the attached image. Currently I am creating my annotations in the code behind and view models, not XAML.

If a composite annotation needs to be created, that is fine.

0 votes
483 views

I have a chart that does not perform well and has a lag.
what I can do to fix this problem?

0 votes
447 views

Hi,

Do you have any examples for using API UniformHeatmapDataSeries.Append(IEnumerable x, params IEnumerable[] yValues);?

This is to plot heat map chart

Thanks
Deepak

  • deepak b asked 5 months ago
  • last active 5 months ago
0 votes
0 answers
513 views

Hello.

I am learning how to use SciChart with a tutorial.
Before zooming, the X-axis is aligned, but after zooming, it is shifted.
Why is this?
Is there a way to prevent this?

Thank you.

0 votes
477 views

Hi,
My requirement is to plot only half of uniform Heat map (1st triangle) chart as shown in attached image. So, is it possible to plot only 1st triangle just by passing input data as 1D array to UniformHeatmapDataSeries? . Does Scichart currently supports this feature?

Thanks
Deepak

  • deepak b asked 5 months ago
  • last active 5 months ago
0 votes
520 views

I want to set ticks of y Axis, like 0, 10, 20, 30, 40, 50…

I tried in this code,
IAxis yAxis = sciChartBuilder.newNumericAxis().withVisibleRange(0, 50).withVisibleRangeLimit(0, 50).withMajorDelta(10d).build();

It did not work!

How can I change the interval in Axis?

0 votes
438 views

Is there a way to remove space in xydataseries? Lets say I have a datetime,double xydataseries. If there is a gap in time it shows on chart. Is there an easy way to remove that? I know I could make it double, double and just increment a value for the first. Problem is that I would like to preserve the datetime to display in a rollover modifier.

  • John asked 5 months ago
  • last active 5 months ago
0 votes
424 views

Hi! I need to draw lines on the ohlc chart programmatically. I attached an image to make it more clear. I looked at the examples and didn’t find a way to do this. The most appropriate example is a spline, but it also does not fit. I’m not sure that it is possible to make custom dataseries. Сould you suggest a way to do this?

0 votes
0 answers
390 views

Hi,

I am using SciChart to display a lot of sensor data. It’s a overview-detail based view where the user select a range on an overview chart to display sensor values in a detail chart.

I have SciChartScrollbar that is bound to a DateTimeAxis. The axis has a DataRange of a long time (eg. 1 year). I use the VisibleRange to select a small subset to display in the detailed chart. This all works perfectly fine.

Now I would like to restrict the SciChartScrollbar to a maximum selectable VisibleRange of eg. 30 days.
I know it is possible to set the VisibleRangeLimit of the Axis, but this sets a Range and not a duration.

Is is possible to restrict the SciChartScrollbar or its DateTimeAxis to a maximum visible range duration?

0 votes
483 views

Hi
I want set gridlines ratio to square not rectangle, like this picture.

0 votes
505 views

See the Attached image — On the right side in addition to the labels 0.01% – 20.0%; Their is a color coded chart of AAA through C/D.

I need this to also be part of the chart; or maybe a separate control that can be transformed and zoomed based on where the chart is at.

If I’m zoomed in on the 0.15% – 0.50% then the B/BB/BBB should also be zoomed in to match the current scale of the chart.

Ideas on how to handle this. I’ve tagged this question as Android, but I will also need a solution for iOS.

0 votes
501 views

This is what I want it to look like: (see 1.jpg)

This is what (see 2.jpg) it does look like if I leave setIsLabelCullingEnabled enabled (all labels are culled except if I zoom WAY in)
This is what (see 3.jpg) it does look like if I turn off setIsLabelCullingEnabled

I would expect #2 to look like #3 without either one of the 20/15% and either 1% or 1.25% culled, when culling is enabled.

First things the specific values/locations are precise, I need those lines and labels exactly where they are. So I had to create my own LogarithmicNumericTickProvider and feed it all the numbers; this worked great and the numbers are where they need to be — but apparently using our own LogarithmicNumericTickProvider totally breaks culling. Any ideas on how we can get culling to work with our own LogarithmicNumericTickProvider. Is their another way to do this without using our own LogarithmicNumericTickProvider.

0 votes
391 views

I want to change the WorldDimensions of a SciChart3DSurface through bindings when the data in the graph changes.
Currently i try to bind to a Vector3 object that has been initialized but i get a the following exception upon startup

Object reference not set to an instance of an object.

SciChart.Charting3D :
at SciChart.Charting3D.SciChart3DSurface.AttachCamera(ICameraController camera)
at SciChart.Charting3D.SciChart3DSurface.AttachChildren()
at SciChart.Charting3D.SciChart3DSurface.OnSciChartSurfaceLoaded()

Showing 151 - 200 of 3k results