Pre loader

Forums

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

1 vote
6k views

I try to use this exemple on my PC with (nodejs 8.13.0) and i can’t run this app example. I receive this error:

× 「wds」: Invalid configuration object. Webpack has been initialized
using a configuration object that does not match the API schema.

configuration.optimization has an unknown property ‘namedModules’.
These properties are valid:

object { checkWasmTypes?, chunkIds?, concatenateModules?,
emitOnErrors?, flagIncludedChunks?, innerGraph?, mangleExports?,
mangleWasmImports?, mergeDuplicateChunks?, minimize?, minimizer?,
moduleIds?, noEmitOnErrors?, nodeEnv?, portableRecords?,
providedExports?, realContentHash?, removeAvailableModules?,
removeEmptyChunks?, runtimeChunk?, sideEffects?, splitChunks?,
usedExports? }

-> Enables/Disables integrated optimizations. Did you mean optimization.moduleIds: “named” (BREAKING CHANGE since webpack 5)?*

Is there compatiblity problem with nodejs LTS version?
Thans for your response.

1 vote
10k views

Hi,

Could you provide any advice on how to get the y axis tick labels in this case to display different numbers. The differentiation may be small, but the labels in this case are not helpful.

See attached.

Thanks,
Jason

  • morseja asked 9 years ago
  • last active 9 years ago
1 vote
2k views

I have a chart with a box annotation. When I try to resize the box annotation by dragging the left or right border, I got the “Uncaught TypeError: Cannot read properties of undefined (reading ‘x’)”. It’s not always reproducible and cannot be reproduced by dragging the whole box. Also, it only occurs with SciChart version 3 but not SciChart version 2. Please check the screenshots for more details.

  • Quyen Sy asked 1 year ago
  • last active 1 year ago
1 vote
2k views

We have been testing different limits of data types we are aiming to draw to the chart, and have found that if all of the values in a series are the same, very near 0, float value, then the line isn’t drawn. We do, however, get the value showing up on the vertical line annotation.

Though we are not using the latest version of SciChart in our production app (Net 4.6.1 requirement, but upgrading that soon), I have managed to reproduce the same in a very simplified .Net7 app using the latest version (7.0.2.27161). I have attached both the test app (with my runtime key removed) and a screenshot of the app.

Here is the code we are using to generate the sample series in the code behind of MainWindow.xaml:

public partial class MainWindow : Window
{
    public MainWindow()
    {
        InitializeComponent();
        this.Loaded += OnLoaded;
    }

    private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)
    {
        var floatData = new XyDataSeries<double, float>();

        for (var i = 0; i < 1000; i++)
        {
            floatData.Append(i, float.Parse(Math.Pow(2, -126).ToString("E")));
        }

        this.FloatSeries.DataSeries = floatData;
    }
}

MainWindow.xaml contains just a SciChart Surface, as follows:

<s:SciChartSurface x:Name="Surface">
            <s:SciChartSurface.RenderableSeries>
                <s:FastLineRenderableSeries x:Name="FloatSeries" 
                                            Stroke="#FF4083B7"/>
            </s:SciChartSurface.RenderableSeries>

            <s:SciChartSurface.XAxis>
                <s:NumericAxis AutoRange="Always"/>
            </s:SciChartSurface.XAxis>

            <s:SciChartSurface.YAxis>
                <s:NumericAxis AutoRange="Always"/>
            </s:SciChartSurface.YAxis>

            <s:SciChartSurface.ChartModifier>
                <s:ModifierGroup>
                    <s:RubberBandXyZoomModifier />
                    <s:ZoomExtentsModifier />

                    <s:VerticalSliceModifier>
                        <s:VerticalSliceModifier.VerticalLines>
                            <s:VerticalLineAnnotation X1="500" 
                                                      IsEditable="True"
                                                      LabelTextFormatting="E"
                                                      Stroke="White" />
                        </s:VerticalSliceModifier.VerticalLines>
                    </s:VerticalSliceModifier>
                </s:ModifierGroup>
            </s:SciChartSurface.ChartModifier>

            <s:SciChartSurface.Annotations>
                <s:TextAnnotation Text="Test app highlighting problem when all x values are floats with the same scientific value"
                                  CoordinateMode="Relative"
                                  X1="0" 
                                  Y1="0"
                                  Margin="2"/>
            </s:SciChartSurface.Annotations>
        </s:SciChartSurface>

Adding another value to the series with result in the line being drawn, as long as it is sufficiently different to the others.

What would be the best way to get this data showing to the users? Whilst highly unlikely the user is going to use such values, we cannot discount this. Would extending the ViewportManager to provide our own range be the best approach? If it impacts on the suggestions, due to our implementation requirements our production app will only show up to two series per surface (with the same data type), but we could be showing upwards of 256 charts (with one of 12 data types as their y-axis type). All of our charts are linked to a common TimeSpanAxis for the x axis.

1 vote
6k views

Hi, I’m looking for a way to programmatically dismiss a RolloverModifier from a chart. I’ve been tasked with creating a user experience that does two things: 1. when a user stops scrubbing on the chart, the rollover modifier should persist, and 2. when the user taps outside of the chart the rollover modifier should disappear.

I’ve accomplished the first part of the problem by implementing a subclass of SCIRolloverModifier and overriding the onEvent(args:) function, but I cannot figure out how to dismiss the rollover modifier when the user taps outside the chart surface.

Is there a way to accomplish this?

1 vote
6k views

Hi,

I am facing a issue with latest version of SciChart. Because of this type error not able to build the project. Can you check this error.

1 vote
2k views

I am using SciChartSurface.create() to create chart and it works well. However, I got the webGL memory issue randomly – WebGL memory issue. I am trying to apply a workaround to use SciChartSurface.createSinge() instead. The createSingle() function doesn’t work for me, the chart cannot be rendered.

const { sciChartSurface, wasmContext } = await SciChartSurface.createSinlge(`${chartId}-chart-root`, { theme: themeObj });

There is no error showing in the developer tool console. I have no idea what’s wrong.

  • Quyen Sy asked 6 months ago
  • last active 6 months ago
1 vote
0 answers
5k views

For cursor labels, if the text of the cursor label is longer than the label text, it is falling outside the axis area. I want it to stay inside the axis as shown in the image, is there any way to do this?

1 vote
16k views

Hello,

I have been working with an application that plots real-time serial data using a FIFO buffer. I have started programming around the ECG-Monitor example as this is exactly what I am creating.

I have a device that broadcasts real-time ECG data via Bluetooth (HC-05), to be exact. I have paired the device and opened a SerialPort in my program to receive the data. My sampling rate is 256 Hz.

When I used a text file to simulate ECG data, it works perfectly well. However, when I use real-time data, there is a delay in charting that increases as the time increases. An easier way to understand this is, the chart continues plotting for a significant period of time even after I have switched off my hardware device.

I have then come to the conclusion that my data is being received at the rate that I want it to, but the plotting gets delayed at an increasing rate as the time increases.

I am currently using the Direct-X rendering type as this gives me a very smooth plot. I receive the data via SerialPort, write to an array and then to the FIFO buffer.

I’m attaching my code for the same.

namespace SciChart.Examples.Examples.SeeFeaturedApplication.ECGMonitor
{
    public class ECGMonitorViewModel : BaseViewModel
    {
    private Timer _timer;
    private IXyDataSeries<double, double> _series0;
    public static double[] _sourceData = new double[50000];
    private int _currentIndex = 0;
    private int _totalIndex = 0;
    private DoubleRange _yVisibleRange;
    private bool _isBeat;
    private int _heartRate;
    private bool _lastBeat;
    private DateTime _lastBeatTime;
    private ICommand _startCommand;
    private ICommand _stopCommand;
    private const double WindowSize = 5.0;
    private const int TimerInterval = 40;
    public static int counter = 0;
    public static SerialPort mySerialPort=new SerialPort("COM3",9600);

    public ECGMonitorViewModel()
    {
        mySerialPort.Open();
        ECGMonitorViewModel.mySerialPort.WriteLine("A");
        ECGMonitorViewModel.mySerialPort.WriteLine("F");

        _series0 = new XyDataSeries<double, double>() { FifoCapacity = 2460, AcceptsUnsortedData = true };

        YVisibleRange = new DoubleRange(-20, 500);
        _startCommand = new ActionCommand(OnExampleEnter);
        _stopCommand = new ActionCommand(OnExampleExit);
    }

    public ICommand StartCommand
    {
        get
        {
            return _startCommand;
        }
    }

    public ICommand StopCommand
    {
        get
        {
            return _stopCommand;
        }
    }

    public IXyDataSeries<double, double> EcgDataSeries
    {
        get
        {
            return _series0;
        }
        set
        {
            _series0 = value;
            OnPropertyChanged("EcgDataSeries");
        }
    }

    public DoubleRange YVisibleRange
    {
        get
        {
            return _yVisibleRange;
        }
        set
        {
            _yVisibleRange = value;
            OnPropertyChanged("YVisibleRange");
        }
    }

    public bool IsBeat
    {
        get
        {
            return _isBeat;
        }
        set
        {
            if (_isBeat != value)
            {
                _isBeat = value;
                OnPropertyChanged("IsBeat");
            }
        }
    }

    public int HeartRate
    {
        get { return _heartRate; }
        set
        {
            _heartRate = value;
            OnPropertyChanged("HeartRate");
        }
    }

    public void OnExampleExit()
    {
        if (_timer != null)
        {
            _timer.Stop();
            _timer.Elapsed -= TimerElapsed;
            _timer = null;
        }
    }

    public void OnExampleEnter()
    {
        _timer = new Timer(TimerInterval) { AutoReset = true };
        _timer.Elapsed += TimerElapsed;
        _timer.Start();
    }

    private void TimerElapsed(object sender, EventArgs e)
    {
        lock (this)
        {
            for (int i = 0; i < 10; i++)
            {
                AppendPoint(250);
            }

            if ((DateTime.Now - _lastBeatTime).TotalMilliseconds < 120) return;

            IsBeat = _series0.YValues[_series0.Count - 3] > 120 ||
                     _series0.YValues[_series0.Count - 5] > 120 ||
                     _series0.YValues[_series0.Count - 8] > 120;

            if (IsBeat && !_lastBeat)
            {
                HeartRate = (int)(60.0 / (DateTime.Now - _lastBeatTime).TotalSeconds);
                _lastBeatTime = DateTime.Now;
            }
        }
    }

    private void AppendPoint(double sampleRate)
    {
        if (_currentIndex >= _sourceData.Length)
        {
            _currentIndex = 0;
        }

        double voltage = _sourceData[_currentIndex];
        double time = _totalIndex / sampleRate %10;

        if(time==0.00)
        {
            voltage = double.NaN;
        }

        _series0.Append(time, voltage);

        _lastBeat = IsBeat;
        _currentIndex++;
        _totalIndex++;
    }

    public static void mySerialPort_DataReceived(object sender, SerialDataReceivedEventArgs e)
    {
        while (mySerialPort.BytesToRead > 0)
        {
            int b;
            b = mySerialPort.ReadByte();
            _sourceData[counter] = b;
            counter++;
        }
    }
}
}

namespace SciChart.Examples.Examples.SeeFeaturedApplication.ECGMonitor
{
    public partial class ECGMonitorView : UserControl
    {
        public ECGMonitorView()
        {
            InitializeComponent();
            ECGMonitorViewModel.mySerialPort.DataReceived += new SerialDataReceivedEventHandler(ECGMonitorViewModel.mySerialPort_DataReceived);
        }
    }
}

The xaml code is as follows,

<UserControl
         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
         xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
         xmlns:local="clr-namespace:SciChart.Examples.Examples.SeeFeaturedApplication.ECGMonitor"
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
         xmlns:s="http://schemas.abtsoftware.co.uk/scichart"
         xmlns:s3D="http://schemas.abtsoftware.co.uk/scichart3D" xmlns:XamlRasterizer="clr-namespace:SciChart.Drawing.XamlRasterizer;assembly=SciChart.Drawing" x:Class="SciChart.Examples.Examples.SeeFeaturedApplication.ECGMonitor.ECGMonitorView"
         d:DesignHeight="400"
         d:DesignWidth="600"
         mc:Ignorable="d">

<UserControl.Resources>

    <Style TargetType="{x:Type s:RenderSurfaceBase}">
        <Setter Property="Effect">
            <Setter.Value>
                <DropShadowEffect BlurRadius="5"
                                  ShadowDepth="0"
                                  Color="#FFB3E8F6" />
            </Setter.Value>
        </Setter>
    </Style>

    <local:BeatToScaleConverter x:Key="BeatToScaleConverter" />
</UserControl.Resources>

<i:Interaction.Triggers>
    <i:EventTrigger EventName="Loaded">
        <i:InvokeCommandAction Command="{Binding StartCommand}" />
    </i:EventTrigger>
    <i:EventTrigger EventName="Unoaded">
        <i:InvokeCommandAction Command="{Binding StopCommand}" />
    </i:EventTrigger>
</i:Interaction.Triggers>

<Grid>

    <s:SciChartSurface RenderPriority="Low" MaxFrameRate="25" AutoRangeOnStartup="False">

        <s:SciChartSurface.RenderableSeries>
            <s:FastLineRenderableSeries DataSeries="{Binding EcgDataSeries}"
                Stroke="#FFB3E8F6"                                      
                StrokeThickness="2" />
        </s:SciChartSurface.RenderableSeries>

        <s:SciChartSurface.YAxis>
            <s:NumericAxis AxisTitle="Voltage (mV)"
                DrawMinorGridLines="True"
                MaxAutoTicks="5"
                VisibleRange="{Binding YVisibleRange, Mode=TwoWay}" />
        </s:SciChartSurface.YAxis>

        <s:SciChartSurface.XAxis>
            <s:NumericAxis AxisTitle="Seconds (s)" TextFormatting="0.000s" VisibleRange="0, 10" AutoRange="Never"/>
        </s:SciChartSurface.XAxis>

        <s:SciChartSurface.RenderSurface>
            <s3D:Direct3D10RenderSurface/>
        </s:SciChartSurface.RenderSurface>

    </s:SciChartSurface>

    <StackPanel Margin="30,30" Orientation="Horizontal">
        <StackPanel.Effect>
            <DropShadowEffect BlurRadius="5"
                ShadowDepth="0"
                Color="#FFB3E8F6" />
        </StackPanel.Effect>

        <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
            <Canvas x:Name="layer1"
                Width="20"
                Height="20"
                Margin="12,34,10,0">
                <Canvas.RenderTransform>
                    <ScaleTransform CenterX="-6"
                        CenterY="-6"
                        ScaleX="{Binding IsBeat, Converter={StaticResource BeatToScaleConverter}}"
                        ScaleY="{Binding IsBeat, Converter={StaticResource BeatToScaleConverter}}" />
                </Canvas.RenderTransform>
                <Path Data="m 0 0 c -4 -4 -8.866933 -10.79431 -10 -15 0 0 0 -5 5 -5 5 0 5 5 5 5 0 0 0 -5 5 -5 5 0 5.242535 4.02986 5 5 -1 4 -6 11 -10 15 z" Fill="#FFB0E6F4" />
            </Canvas>
        </Grid>

        <TextBlock HorizontalAlignment="Left"
            VerticalAlignment="Top"
            FontFamily="ArialBlack"
            FontSize="36"
            FontWeight="Bold"
            Foreground="#FFB0E6F4"
            Text="{Binding HeartRate}" />
        <TextBlock HorizontalAlignment="Left"
            VerticalAlignment="Top"
            FontFamily="ArialBlack"
            FontSize="36"
            FontWeight="Bold"
            Foreground="#FFB0E6F4"
            Text="BPM" />

    </StackPanel>

    <TextBlock Margin="5"
        HorizontalAlignment="Left"
        VerticalAlignment="Bottom"
        FontSize="9"
        FontStyle="Italic"
        Foreground="#FFB0E6F4"/>

</Grid>

I’ve attached pictures of what my program currently does. I have also attached a file with sample data in case anybody wants to test the program. I have also tried building in release mode and that doesn’t help, either.

The only issue is the delay in plotting of real-time data. Otherwise, the graphing and rendering is really smooth. As I am a complete beginner to this, can somebody help with me with what I might have done wrong?

Thanks a ton,

Jaivignesh Jayakumar

1 vote
7k views

Hi,

I have am plotting a data series comprising of positive and negative values. I’ve used Column Series, and Numeric Axis.
These (seem) to work fine when the number of data points on the x-axis is in the range of 1000-2000, but when I try to plot 10,000+ columns on the chart, negative values are selectively not rendered.

So what used to be an equal distribution of positive and negative values for the time series using columns now increasingly becomes positive-only as the number of columns is increased.

The width of the chart is roughly 2000 pixels, and I’m plotting anywhere from 3K to 20K+ points.

I would greatly appreciate any suggestions – this is major obstacle for visualizing my data.

The attached file shows this.

Thanks.
Ceremony

1 vote
7k views

I am using the examples app for Android and I am noticing that sometimes in the Line Chart example the background colour changes to black instead of the standard grey colour. Seems to be a random occurrence. I am currently testing on a Nexus 7 running 4.4.2. The problem doesn’t occur on my Nexus 4 running 5.1.1.

Thank you,

Andrew

1 vote
12k views

Hi, i have follow the guide to create a chart but i would insert data every 1 second in a Line chart… i have do it but this is the result.

1 vote
10k views

I am trying to add a “LineArrowAnnotation” using a composite annotation.
When I run my code (see below) I get an exception (also below).
When I put “AnnotationCoordinateMode” in AnnotationCoordinateMode.Absolute,
it will show the LineArrowAnnotation, but on the wrong place.

When I run my code I get the following exception:

‘NaN’ is not a valid value for property ‘Y1’.

And this is the stack trace:

   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at SciChart.Charting.Visuals.Annotations.LineArrowAnnotation.c4fae01a1bd9d8777f0acbea006c37ddd(AnnotationCoordinates cb7eea21dddaf59b654790a03f7fecf82, LineArrowAnnotation c7816e538855bcbae71ae0f6efa624460)
   at SciChart.Charting.Visuals.Annotations.LineArrowAnnotation.ca698bc0a82170c849e74a3955c194cda.PlaceAnnotation(AnnotationCoordinates coordinates)
   at SciChart.Charting.Visuals.Annotations.AnnotationBase.PlaceAnnotation(AnnotationCoordinates coordinates)
   at SciChart.Charting.Visuals.Annotations.AnnotationBase.MakeVisible(AnnotationCoordinates coordinates)
   at SciChart.Charting.Visuals.Annotations.AnnotationBase.Update(ICoordinateCalculator`1 xCoordinateCalculator, ICoordinateCalculator`1 yCoordinateCalculator)
   at SciChart.Charting.Visuals.Annotations.CompositeAnnotation.Update(ICoordinateCalculator`1 xCoordinateCalculator, ICoordinateCalculator`1 yCoordinateCalculator)
   at SciChart.Charting.Visuals.Annotations.AnnotationBase.TryUpdate(ICoordinateCalculator`1 xCalc, ICoordinateCalculator`1 yCalc)
   at SciChart.Charting.Visuals.Annotations.AnnotationBase.Refresh()
   at SciChart.Charting.Visuals.Annotations.AnnotationBase.ccc682ea04b7d185ec619d8e3262c6d9b()
   at SciChart.Charting.Visuals.Annotations.AnnotationBase.OnAnnotationLoaded(Object sender, RoutedEventArgs e)
   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.RaiseEvent(RoutedEventArgs e)
   at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
   at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
   at MS.Internal.LoadedOrUnloadedOperation.DoWork()
   at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   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)

This is the code I use to draw the “LineArrowAnnotation”:

var line = new LineArrowAnnotation
{
     X1 = (double)annotation.MeasureFrom,
     X2 = (double)annotation.MeasureTo,
     Y1 = 0.9d,
     Y2 = 0.9d,
     Padding = new Thickness(0, 20, 0, 20),
     HeadLength = 4,
     HeadWidth = 6,
     //ToolTip = annotation.Tooltip,
     SnapsToDevicePixels = true,
     //CoordinateMode = AnnotationCoordinateMode.Absolute,
     CoordinateMode = AnnotationCoordinateMode.RelativeY,
     Stroke = new SolidColorBrush(color),
     StrokeDashArray = new DoubleCollection { 2, 2 },
     Tag = annotation,
};
Annotations.Add(line);
  • Kevin Goos asked 7 years ago
  • last active 7 years ago
1 vote
0 answers
6k views

Hi there,

I am having a few issue with an application using the SeriesBinding and IRenderableSeriesViewModel.

As a small back ground, I have an application which has a number of tabs, two of which have independent charts (one tab has 4 charts in it, the other just 1).

When I am focused on first (main) tab, and update the DataSeries, the chart in the other tab (secondary) is not updated. After this point it doesnt seem to matter if I focus on the secondary tab again, the data just wont refresh.

I was using 4.2.4.10343, but rolled back to 4.2.3.10206 (just a random step backwards) which seem to fix this issue, so maybe there is a bug that’s crept in in the last few releases? If so, it seems to be that the loss of focus / lack of visibility of the chart being updated means that the SeriesBinding is no longer valid?

Also, in my main chart (see below) I am using a CustomAnnotationChartModifier similar to that described here, and although the rollback to 4.2.3.10206 fixes the issue of the plots not redrawing, it is the case that the custom annotations are not automatically positioned when the control has no focus (more likely because it is not visible). This is the same going back to at least version 4.2.2.9381.

For info the SimulationResultViewModel.RenderViewModels object is an ObservableCollection of IRenderableSeriesViewModels populated with LineRenderableSeriesViewModels with simple XyDataSeries.

<SciChart:SciChartSurface Name="chart" Grid.Row="0" Grid.Column="0"
                              GridLinesPanelStyle="{StaticResource GridLinesPanelStyle}" SciChart:ThemeManager.Theme="BrightSpark"
                              RenderableSeries="{SciChart:SeriesBinding SimulationResultViewModel.RenderViewModels}"
                              viewModels:Injector.PassSurfaceToViewModel="True"
                              PreviewMouseDown="chart_MouseDown"
                              PreviewMouseUp="chart_MouseUp">

        <SciChart:SciChartSurface.XAxis >

            <SciChart:NumericAxis x:Name="xAxis" AxisTitle="Lap Number" DrawMajorBands="False" LabelProvider="{StaticResource CustomXAxisLabelFormatter}" GrowBy="0.02, 0.02" AutoRange="Once" VisibleRange="{Binding SimulationResultViewModel.XAxisVisibleRange, Mode=TwoWay}"/>
        </SciChart:SciChartSurface.XAxis>
        <SciChart:SciChartSurface.YAxis>
            <SciChart:NumericAxis x:Name="yAxis" AxisTitle="Time" DrawMajorBands="False"  AxisAlignment="Left" LabelProvider="{StaticResource CustomYAxisLabelFormatter}"  GrowBy="0.05, 0.05" AutoRange="Once" VisibleRange="{Binding SimulationResultViewModel.YAxisVisibleRange, Mode=TwoWay}"/>
        </SciChart:SciChartSurface.YAxis>


        <SciChart:SciChartSurface.ChartModifier>
            <SciChart:ModifierGroup>

                <viewModels:CustomAnnotationChartModifier x:Name="customAnnotations" LabelsSource="{Binding SimulationResultViewModel.ChartLabels}"/>

                <SciChart:RolloverModifier Name="rollover" SourceMode="AllSeries" DrawVerticalLine="True" ShowTooltipOn="{Binding SettingsManager.ShowToolTipOptions}"/>

                <SciChart:ZoomPanModifier ReceiveHandledEvents="True" ClipModeX="None"/>
                <SciChart:MouseWheelZoomModifier x:Name="mouseWheelZoomModifier"/>
                <SciChart:RubberBandXyZoomModifier x:Name="rubberBandZoomModifier" IsEnabled="True" IsXAxisOnly="False" ZoomExtentsY="False" IsAnimated="True" ExecuteOn="MouseRightButton"/>
                <SciChart:ZoomExtentsModifier x:Name="zoomExtentsModifier" ExecuteOn="MouseDoubleClick"/>

                <SciChart:TooltipModifier Name="tooltip" IsEnabled="True" UseInterpolation="False" TooltipLabelDataContextSelector="{Binding TooltipDataContext}" ShowTooltipOn="{Binding SettingsManager.ShowRollOver}" />


            </SciChart:ModifierGroup>
        </SciChart:SciChartSurface.ChartModifier>


    </SciChart:SciChartSurface>
1 vote
7k views

We are considering using SciChart (WPF), but only if its performance is ‘reasonable’ across Remote Desktop / or via Citrix Server. Have you addressed the known problems of using WPF applications across RDP / Citrix? If so, could you provide some stats as to the performance across RDP?

The reason we are asking is that our current software in which we are using our own high speed rendering is doing fine with a lot of data on the local machine, but is not doing so well across RDP. This is not a huge surprise given the known issues of WPF and RDP (for example see https://stackoverflow.com/a/1005739/246758). We may need to deal with this slowness as more of our customers are using Citrix-servers to run our software.

Any feedback on performance of SciChart across RDP / or using Citrix would be much appreciated!

1 vote
5k views

Hello,

I recently migrated to SciChart from Telerik.
Passage more than excellent from the point of view of the architecture and, of course, of the performances.

A small note about the style of the SciChartScrollbar of an axis.

I can obtain a results similar to the attached image?
Main points are:

  • Put scrollbar between Axis and chart area
  • Styling scrollbar extremity with the little gray arrows.

Tanks very much,
marc.

1 vote
8k views

Hi,

3d Surface Chart
I have read the announcement for 3d charts on iOS and Android. That’s exactly me requirement.
Is a release date already planned or is a beta version available?
What are the limitations for a 3d chart on Android (number of points, memory consumption, time to create the view).
We need a 3d surface chart with x=400 points and y= ~1000point (400’000 points).

  • Is this possible?
  • Can this chart be rotated fluid?

2d Chart
I have a requirement for a 2d chart on Android.
The user must be able to move some points in a line chart. Like “design” a set curve.

  • Is this possible?
  • Exist’s some codes samples?

Best regards
Urs

  • Urs Geser asked 5 years ago
  • last active 5 years ago
1 vote
5k views

Has anyone ever encountered this problem?
Could you give me a help? How to solve this problem?
The app didn’t run in the method of ‘getStrokeColors()’, when I debugged.

public class BubbleChartFragment extends ExampleBaseFragment {
    ...

    {
    ...
    FastBubbleRenderableSeries mRSeries = sciChartBuilder.newBubbleSeries()
                    .withDataSeries(dataSeries)
                    .withZScaleFactor(zScaleFactor / 10f)
                    .withBubbleBrushStyle(new SolidBrushStyle(0xffff0000))
                    .withAutoZRange(false)
                    .withStrokeStyle(0xff00ff00, 20f)
                    .withPaletteProvider(new StrokePaletteProvider())
                    .build();
    }

    private class StrokePaletteProvider extends PaletteProviderBase<FastBubbleRenderableSeries> implements IStrokePaletteProvider {
            private final IntegerValues colors = new IntegerValues();
            private final int[] desiredColors = new int[]{0xFF00FF00, 0xFF0000FF};

            protected StrokePaletteProvider() {
                super(FastBubbleRenderableSeries.class);
            }

            @Override
            public void update() {
                final BubbleRenderPassData currentRenderPassData = (BubbleRenderPassData) renderableSeries.getCurrentRenderPassData();

                final int size = currentRenderPassData.pointsCount();
                colors.setSize(size);

                final int[] colorsArray = colors.getItemsArray();
                final int[] indices = currentRenderPassData.indices.getItemsArray();
                for (int i = 0; i < size; i++) {
                    final int index = indices[i];
                    colorsArray[i] = desiredColors[index % 2];
                }

            }

            @Override
            public IntegerValues getStrokeColors() {
                return colors;
            }
        }
    }
  • SiYuan Ou asked 5 years ago
  • last active 5 years ago
1 vote
9k views

Hello.

I am working on Xamarin Android project with C#. Since having a legend within the chart causes problems with too many axis’ (no scrolling is available thus selecting different series in a legend becomes unavailable) and having a legend outside of chart area, anywhere we desire, would be of a preference, is there a tutorial on how could I achieve such a thing? Our project needs this functionality for both Android and iOS.

Would be grateful if anyone could help out with this issue.

Thank you in advance!

  • pauzu asked 5 years ago
  • last active 5 years ago
1 vote
11k views

I am trying to modify the 3D Charts > Tooltips and Hit Test 3D Charts > Series Tooltips 3D Chart example to change the colour of the tooltip crosshairs to red. By crosshairs I mean the green lines in the image attached.

Green Crosshairs

I modified SeriesTooltips3DChart.xaml by adding:

    <UserControl.Resources>
        <Style x:Key="MyCrosshairOverlayStyle" TargetType="Line">
            <Setter Property="Stroke" Value="Red" />
            <Setter Property="StrokeThickness" Value="2" />
        </Style>
        <Style x:Key="MyCrosshairProjectionStyle" TargetType="t3D:CrosshairLines">
            <Setter Property="CrosshairOverlayStyle" Value="{StaticResource MyCrosshairOverlayStyle}" />
            <Setter Property="ProjectionMode" Value="Crosshair" />
        </Style>
    </UserControl.Resources>

and modifying the TooltipModifier3D element:

<t3D:TooltipModifier3D CrosshairMode="Lines" CrosshairPlanesFill="#33FF6600" CrosshairProjectionStyle="{StaticResource MyCrosshairProjectionStyle}" />

I expected this to apply the coloured lines but it did not. What have I misunderstood?

1 vote
6k views

Hello

I have got a valid licence, but I have got an error when I run my app. I generate runtime key on my profile page (schichart.com/profile), I write this runtime key into SciChartSurface.SetRuntimeLicenseKey function, but doesn’t work. The error occurs in xaml <s:SciChartSurface> tag, and text is

"Sorry, You need to have a licence to use Scichart.For instructions...."

What can I do?

Thank you very much.

1 vote
13k views

Hi there

How to change crosshair’s and rollover’s tooltip, in particular lowest to low and highest to high?

  • VRueda asked 11 years ago
  • last active 10 years ago
1 vote
4k views

I was trying to test SciChart on simulator, but I have a problem: I added chart surface on my view, and after I launch an app, SciChart is showing me this text on the screen :
“Hardware rendering performance of SciChart in simulator is SLOW. Please use an actual device to feel the real-world performance”
How do I remove this text and test my charts on the simulator?

1 vote
12k views

I currently have a scatter plot:
XyScatterRenderableSeries series = new XyScatterRenderableSeries();
series.PointMarker = new EllipsePointMarker()
{
Fill = Colors.Blue,
Width = 3,
Height = 3,
};
series.AntiAliasing = false;
series.ResamplingMode = Abt.Controls.SciChart.Numerics.ResamplingMode.None;
With 12000 points. The points are sorted, but I’m still having performance issues. When zoomed all the way out panning and zooming is very slow/choppy. Is there a way to set up the series so that it has higher performance?

Thanks,
Greg

1 vote
12k views

Hello,
first at all im very new to SciChart. I actually evaluate it for our Software.
I like the Performance from Scichart.

But now i have a little Problem.

Please have a look at the DEmo-Application. I use MVVM-Light. Think you have to install it via Nuget.

I’ve made two Buttons. With the first one i generate 2 Axis and with the Second – one 4 Axis (Just for testing). This works very fine. I see the GRaph and the GRidlines.

Now i want to generate some Lines for the different Axes.
But when i try to add a new ChartSeriesViewModel to my Seriessource alls Gridlines where hide and the Line wont show. What i’m doing wrong here ?
Can you help me to generate an Example via MVVM to generate more lines for different Axes and fill the Lines with an Timer ?

##########UPDATE

i got the most on my own. I have one left Problem. i want a static x-Axes. For Example from 1 – 60 seconds. And a scrolling chart.
Don’t know how to get this. Actually i have only an increasing x-axes.

Is it possible to make two X-Axes. One Scrolling and one fix. And then i can hide the scrolling one ?
Do you know what i mean ?I have made an attachment with my Demo-Application.
Please have a look at the image. This is how i want that it looks like. The fixed X-Axes and the coninious scrolling Graph.
Thanks

########UPDATE 2

Ok here some more Explanation

In the Screenshots below you can see our actual Graph

In the Graph1 you can see a static X-Axes from 0-60 seconds

In the GRaph2 you can see the Graph starts scrolling. I tried this with Scichart. But the only possibility to start scrolling on the Graph is to set the FifoCapacity from the XyDataSeries. I want to have a Capacity from over 100000 Points to analyze the Graph on a later time with pan and zoom.

In the GRaph 3 you can see a scrolling GRaph and a static x-Axes from 0-60 Seconds. AND The Gridlines do NOT Scroll with the Graph.

In the GRaph 4 we can stop the Measurement. That is also possible with Scichart.
And in the last GRaph we can Pan and Zoom on the stopped Graph. Think this is also possible with Scichart.

So what is not possible (with my knowledge) is, that the Graph should Scroll and The Gridlines should not Scroll.

I trid following:
I set two X-Axes. One with Autorange=”Always” and visibility Collapsed. The FastlinerenderableSeries i set to this X-Axes.
The other X-Axes i set to Autorange=”never” and visible. but the GRidlines always scroll and i think that were the Gridlines from the first X-Axis.

So i hope you understand my Problem now and can help me to find a Solution.

Thanks a lot

Nice Wishes

1 vote
11k views

Good day!
I’m working with painting FastMountainRenderableSeries. Now I need to give to user an ability to paint curve not only under the line, but above line too.
Is there any automatic property to make it?
Thank in advance.

  • Egor asked 10 years ago
  • last active 10 years ago
1 vote
11k views

Hi,

After I’ve added some TextAnnotations on the graph, I’ve noticed that the TextAnnotations and CustomaAnnotations doesn’t resize with the view. They all stay constant in size. I’ve found a previous question about this in here: https://www.scichart.com/questions/question/text-annotation-size

But I’m not getting the results I hoped for with this. The test is still not resizing with the surface. Since it’s been a while that a question was asked about this, maybe there are new methods to do this in Scichart?

Thanks

  • kewur asked 10 years ago
  • last active 9 years ago
1 vote
8k views

Hi everybody! I’m using SciChart V2.2.5. I have a chart with XyDataSeries<DateTime, double> on it, and i need to associate some extra data with each point to be able to display it on hint.
Something like this:

struct Point
{
    public DateTime XValue;
    public double YValue;
    public long ByteOffset;
}

And i need to find ByteOffset associated with XValue and YValue when user moves mouse over the point in the chart.

  • Danila asked 9 years ago
  • last active 9 years ago
1 vote
7k views

Hello there,

I just updated SciChart from 6.4.0.13629 to 6.5.1.26063.

We used the mentioned function to export a chart to PNG as a stream, to include it in our PDF generation.

I played around with the parameters, but none seemed to work.

Since the update, we encounter the following exception:

System.InvalidOperationException: 'UIElement.Measure(availableSize) cannot be called with NaN size.'
   at System.Windows.UIElement.Measure(Size availableSize)
   at SciChart.Charting.Visuals.SciChartSurface.PrepareSurfaceForExport(Double width, Double height)
   at SciChart.Charting.Visuals.SciChartSurface.CreateCloneOfSurfaceInMemory(Size newSize)
   at SciChart.Charting.Visuals.SciChartSurfaceBase.qem(Boolean pu, Nullable`1 pv)
   at SciChart.Charting.Visuals.SciChartSurfaceBase.qel(ExportType pr, Boolean ps, Nullable`1 pt)
   at SciChart.Charting.Visuals.SciChartSurfaceBase.ExportToStream(ExportType exportType, Boolean useXamlRenderSurface, Size size)
1 vote
25k views

I looked at the Multi-pane stock charts example and fail to understand how I can have the height of my panes change dynamically during runtime as function of updated window size (SizeChanged event) or when adjusting the number panes in the chartgroup? Problem with the below code is that when I resize the window only the first pane in chartgroup is changed not any of the other panes. What am I missing? Do I need to also bind the SciChartSurface.Height within the ItemTemplate to Height for each individual pane height? (I commented out the Height property binding in SciChartSurface. Would I need that?). Either way the panes do not resize when the whole window resizes. I made sure the events all fire and “ChartGroupHeight” is properly updated each time the window is resized.

I implemented the following in my view:

<i:Interaction.Triggers>
    <i:EventTrigger EventName="SizeChanged">
        <mvvm:EventToCommand 
            Command="{Binding UserControlResizedCommand, Mode=OneWay}"
            EventArgsConverterParameter="{Binding ElementName=LayoutRoot}"
            PassEventArgsToCommand="True" />
    </i:EventTrigger>
</i:Interaction.Triggers>

<UserControl.Resources>

    <!-- This allows setting the Height of a pane from a viewmodel -->
    <Style x:Key="ChartPaneStyle" TargetType="s:SciChartGroupPane">
        <Setter Property="Height" Value="{Binding ChartGroupHeight, Mode=TwoWay}"/>
    </Style>

    <!-- A number of converters which change parameters of charts based on the IsFirstChartPane property -->
    <resources:BoolToValueConverter x:Key="MinorsPerMajorConverter" TrueValue="4" FalseValue="2"/>
    <resources:BoolToValueConverter x:Key="MaxAutoTicksConverter" TrueValue="8" FalseValue="4"/>
    <resources:BoolToValueConverter x:Key="GrowByConverter" >
    <resources:BoolToValueConverter.TrueValue>
        <s:DoubleRange Min="0.02" Max="0.02"/>
    </resources:BoolToValueConverter.TrueValue>
    <resources:BoolToValueConverter.FalseValue>
        <s:DoubleRange Min="0.02" Max="0.02"/>
    </resources:BoolToValueConverter.FalseValue>
    </resources:BoolToValueConverter>

</UserControl.Resources>

<Grid>

    <Grid.RowDefinitions>
        <RowDefinition Height="32" />
        <RowDefinition Height="*" />
    </Grid.RowDefinitions>

    <StackPanel Grid.Row="0" Orientation="Horizontal" Background="Black">
        <TextBlock Text="Dataseries Type:" Margin="5,0" VerticalAlignment="Center" FontSize="12" Foreground="White"/>
        <ComboBox x:Name="ComboBox_ChooseSeriesType" MinWidth="140" Margin="5,3" VerticalContentAlignment="Center"/>
        <TextBlock Text="Theme:" Margin="5,0" VerticalAlignment="Center" FontSize="12" Foreground="White"/>
        <ComboBox x:Name="ComboBox_ChooseTheme" MinWidth="140" Margin="5,3" VerticalContentAlignment="Center"/>
    </StackPanel>

    <s:SciChartGroup
        Grid.Row="1" 
        ItemsSource="{Binding ChartPaneViewModels}"
        s:ThemeManager.Theme="{Binding ElementName=ComboBox_ChooseTheme, Path=SelectedItem}"
        ItemContainerStyle="{StaticResource ChartPaneStyle}">

        <s:SciChartGroup.ItemTemplate>

            <DataTemplate>

                <s:SciChartSurface
                    s:SciChartGroup.VerticalChartGroup="SharedChartGroup"
                    SeriesSource="{Binding ChartSeriesViewModels}">
                    <!--Height = "{Binding Height}">-->

                    <s:SciChartSurface.XAxis>
                        <s:DateTimeAxis Visibility="Visible" 
                                        LabelProvider="{Binding XAxisFormatting}" 
                                        VisibleRange="{Binding ParentViewModel.XVisibleRange, Mode=TwoWay}"
                                        GrowBy="0.02, 0.02"/>
                    </s:SciChartSurface.XAxis>

                    <s:SciChartSurface.YAxis>
                        <s:NumericAxis AxisAlignment="Right"
                                       Visibility="Visible" 
                                       TextFormatting="{Binding YAxisTextFormatting}" 
                                       GrowBy="0.02, 0.02" 
                                       AutoRange="Always"/>
                    </s:SciChartSurface.YAxis>

                    <s:SciChartSurface.ChartModifier>
                        <s:ModifierGroup s:MouseEventGroup="SharedMouseGroup">

                            <!-- Provides Interactivity -->
                            <s:RubberBandXyZoomModifier IsAnimated = "False" IsXAxisOnly = "True" ExecuteOn = "MouseRightButton"/>
                            <s:ZoomPanModifier XyDirection="XYDirection" ClipModeX = "ClipAtExtents" ExecuteOn ="MouseLeftButton" />
                            <s:MouseWheelZoomModifier XyDirection = "XYDirection"/>
                            <s:ZoomExtentsModifier IsAnimated = "False" ExecuteOn = "MouseDoubleClick" />
                            <s:XAxisDragModifier  DragMode = "Scale"/>
                            <s:CursorModifier SourceMode="AllSeries"  UseInterpolation="True"/>
                            <s:LegendModifier ShowLegend="True" LegendPlacement ="Inside" GetLegendDataFor="AllSeries" Margin="10"/>

                            <!-- Provides selection of series and custom styling to the selected series -->
                            <!--<s:SeriesSelectionModifier ReceiveHandledEvents="True">
                                <s:SeriesSelectionModifier.SelectedSeriesStyle>
                                    <Style TargetType="s:BaseRenderableSeries">
                                        <Setter Property="SeriesColor" Value="White"/>
                                        <Setter Property="PointMarkerTemplate">
                                            <Setter.Value>
                                                <ControlTemplate>
                                                    <s:EllipsePointMarker Fill="#FF00DC" Stroke="White" Width="7" Height="7"/>
                                                </ControlTemplate>
                                            </Setter.Value>
                                        </Setter>
                                    </Style>
                                </s:SeriesSelectionModifier.SelectedSeriesStyle>
                            </s:SeriesSelectionModifier>-->

                            <!-- Provides a data source for the legend control -->


                        </s:ModifierGroup>
                    </s:SciChartSurface.ChartModifier>

                </s:SciChartSurface>

            </DataTemplate>
        </s:SciChartGroup.ItemTemplate>
    </s:SciChartGroup>

</Grid>
  • bbmat asked 9 years ago
  • last active 2 years ago
1 vote
16k views

I created a very simple project with a single grid and one element which is the scichart. Everything renders normally when the program first starts. If I make the window smaller vertically by dragging, everything continues to render correctly, but when I increase the height of the window by dragging, the vertical axis value label (4000.00) gets clipped if I go about 50 pixels more than the original window height specified.

Note: the clipping is all at once, if I go one pixel too far, the labels clip as shown. If I make the window one pixel smaller, they appear normally again.

What can I do?

Label Clipped

1 vote
6k views

Hi. For example, I set yAxis VisibleRange(-100, 100), but I need to see only 3 gridlines: -100, 0 and 100. I cannot find how to remove other gridlines.

1 vote
11k views

A new user to scichart needing a little guidance. I’m zooming and panning a chart succesfully using mouseWheelZoomModifier, zoomPanModifier and zoomExtentsModifier. I want to tabulate the extents of the chart after a mouse wheel zoom but cant seem to find an event which is triggered at the completion of a mouse wheel zoom. Hope you can help
Many thanks

1 vote
6k views

Hi, Support team.

I’m using MVVM pattern and trying to implement multi-chart which can insert Box Annotations at the same time into each chart .
So I’m testing in SciChart Example [“DigitalAnalyzerPerformanceDemo”] to know how to implement this.

But what i only got is just looping through and create annotation for each ChannelViewModels.

In the Demo, the VisibleRange ‘XRange’ is shared to all the ChannelViewModels by binding TwoWay-mode in ParentViewModel without looping for each ChildViewModels.
Like this, I wonder is there ways to apply BoxAnnotation all the ChannelViewModel at the same time by binding in ParentViewModel.

    <!-- BottomAxis -->
        <s:SciChartSurface Grid.Column="1">
            <s:SciChartSurface.XAxis>
                <s:NumericAxis Height="30"
                               AxisAlignment="Bottom"
                               VisibleRange="{Binding XRange, Mode=TwoWay}"                 
                               LabelProvider="{StaticResource TimeLabelProvider}"
                               MajorTickLineStyle="{StaticResource TimeAxisMajorTickLineStyle}"
                               MinorTickLineStyle="{StaticResource TimeAxisMinorTickLineStyle}"/>
            </s:SciChartSurface.XAxis>
            <s:SciChartSurface.YAxis>
                <s:NumericAxis Visibility="Collapsed"/>
            </s:SciChartSurface.YAxis>
        </s:SciChartSurface>
    </Grid>

    <!--  Create an X Axis with GrowBy  -->
     <s:SciChartSurface.XAxis>
           <s:NumericAxis Style="{StaticResource HiddenAxisStyle}"
                    VisibleRangeLimitMode="Min"
                    VisibleRangeLimit="0,0"
                    VisibleRange="{Binding DataContext.XRange, Mode=TwoWay, RelativeSource={RelativeSource AncestorType=ItemsControl, AncestorLevel=2}}"/>
     </s:SciChartSurface.XAxis>

I tried to bind annotation in ParentViewModel like XRange Binding method, But it doesn’t work.


This is View.xaml.

<Grid Grid.IsSharedSizeScope="True" IsEnabled="{Binding IsLoading, Converter={StaticResource InvertBooleanConverter}}">


    <!-- BottomAxis -->
        <s:SciChartSurface Grid.Column="1">
            <s:SciChartSurface.XAxis>
                <s:NumericAxis Height="30"
                               AxisAlignment="Bottom"
                               VisibleRange="{Binding XRange, Mode=TwoWay}"                 
                               LabelProvider="{StaticResource TimeLabelProvider}"
                               MajorTickLineStyle="{StaticResource TimeAxisMajorTickLineStyle}"
                               MinorTickLineStyle="{StaticResource TimeAxisMinorTickLineStyle}"/>
            </s:SciChartSurface.XAxis>
            <s:SciChartSurface.YAxis>
                <s:NumericAxis Visibility="Collapsed"/>
            </s:SciChartSurface.YAxis>
        </s:SciChartSurface>
    </Grid>

    <!-- Channels -->
        <ScrollViewer Background="#1C1C1E"
                      VerticalScrollBarVisibility="Auto"
                      HorizontalScrollBarVisibility="Disabled">

            <b:Interaction.Behaviors>
                <common:DigitalAnalyzerScrollBehavior ChannelHeightDelta="10" ChangeChannelHeightCommand="{Binding ChangeChannelHeightCommand}"/>
            </b:Interaction.Behaviors>

            <ItemsControl x:Name="chartItemsControl" ItemsSource="{Binding ChannelViewModels}">

                <b:Interaction.Behaviors>
                    <common:FocusedChannelScrollBehavior ScrollToFocusedChannel="False"/>
                </b:Interaction.Behaviors>

                <ItemsControl.ItemTemplate>
                    <DataTemplate DataType="{x:Type local:ChannelViewModel}">
                        <Grid Background="#2D2C32" Height="{Binding ChannelHeight, Mode=OneWay}" Focusable="False" UseLayoutRounding="False" >
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition SharedSizeGroup="ChannelNames" />
                                <ColumnDefinition />
                            </Grid.ColumnDefinitions>

                            <Border BorderThickness="0,0,0,1" BorderBrush="#1C1C1E">
                                <DockPanel>
                                    <Border DockPanel.Dock="Left"     
                                            Background="{Binding ChannelColor, Mode=OneWay}" 
                                            Width="5"/>

                                    <TextBlock DockPanel.Dock="Left"
                                               Margin="10,5"
                                               VerticalAlignment="Center"
                                               Foreground="White"
                                               Text="{Binding ChannelName}"/>
                                </DockPanel>
                            </Border>

                            <s:SciChartSurface x:Name="channelSurface" Grid.Column="1"
                                               RenderableSeries="{Binding RenderableSeries}"
                                               Annotations="{s:AnnotationsBinding  DataContext.Annotations, Mode=TwoWay, RelativeSource={RelativeSource AncestorType=ItemsControl, AncestorLevel=2} }">

                                <!--  Create an X Axis with GrowBy  -->
                                <s:SciChartSurface.XAxis>
                                    <s:NumericAxis Style="{StaticResource HiddenAxisStyle}"
                                                   VisibleRangeLimitMode="Min"
                                                   VisibleRangeLimit="0,0"
                                                   VisibleRange="{Binding DataContext.XRange, Mode=TwoWay, RelativeSource={RelativeSource AncestorType=ItemsControl, AncestorLevel=2}}"/>
                                </s:SciChartSurface.XAxis>

                                <!--  Create a Y Axis with GrowBy. Optional bands give a cool look and feel for minimal performance impact  -->
                                <s:SciChartSurface.YAxis>
                                    <s:NumericAxis Style="{StaticResource HiddenAxisStyle}"
                                                   VisibleRange="{Binding YRange, Mode=OneWay}"/>
                                </s:SciChartSurface.YAxis>

                                <s:SciChartSurface.ChartModifier>
                                    <s:ModifierGroup s:MouseManager.MouseEventGroup="ChannelModifierGroup">
                                        <s:RubberBandXyZoomModifier IsAnimated="False" IsXAxisOnly="True" ZoomExtentsY="False" ReceiveHandledEvents="True" IsEnabled="{Binding IsChecked, Mode=OneWay, ElementName=IsZoomEnabled}"/>
                                        <s:ZoomPanModifier ZoomExtentsY="False" XyDirection="XDirection" IsEnabled="{Binding IsChecked, Mode=OneWay, ElementName=IsPanEnabled}"/>
                                        <s:ZoomExtentsModifier XyDirection="XDirection" IsAnimated="False" />
                                        <s:MouseWheelZoomModifier XyDirection="XDirection" />
                                    </s:ModifierGroup>
                                </s:SciChartSurface.ChartModifier>
                            </s:SciChartSurface>

                            <Border Grid.Column="1"
                                    BorderThickness="0,0,0,1"
                                    BorderBrush="#2D2C32"
                                    VerticalAlignment="Bottom"/>
                        </Grid>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
        </ScrollViewer>
    </Border>


</Grid>

This is ViewModel.cs

public class DigitalAnalyzerExampleViewModel : BaseViewModel
{
    private bool _isLoading;
    private DoubleRange _xRange;

    public DigitalAnalyzerExampleViewModel()
    {
        ChannelViewModels = new ObservableCollection<ChannelViewModel>();
        Annotations = new ObservableCollection<IAnnotationViewModel>();
        Annotations.Add(new BoxAnnotationViewModel() { X1 = 0, X2 = 1000, Y1 = 0, Y2 = 1 }); //I want to implement sharing annotation like this.

        SelectedChannelType = "Digital";
        SelectedChannelCount = 32;
        SelectedPointCount = 1000000;
        SelectedResamplingPrecision =ResamplingPrecision.Default;
        SelectedStrokeThickness = 1;

        ChangeChannelHeightCommand = new ActionCommand<object>((d) =>
        {
            var delta = (double)d;
            foreach (var channelViewModel in ChannelViewModels)
            {
                channelViewModel.SetChannelHeightDelta(delta);
            }
        });

        AddChannelCommand = new ActionCommand(async () =>
        {
            IsLoading = true;

            var isDigital = SelectedChannelType == "Digital";
            await AddChannels(isDigital ? 1 : 0, isDigital ? 0 : 1);

            IsLoading = false;
        });

        LoadChannelsCommand = new ActionCommand(async () =>
        {
            IsLoading = true;

            // Clear ViewModels
            foreach (var channelVm in ChannelViewModels)
            {
                channelVm.Clear();
            }
            ChannelViewModels.Clear();
            XRange = null;

            // Create a bunch of Digital channels
            await AddChannels(SelectedChannelCount, 0);

            XRange = new DoubleRange(0, SelectedPointCount);
            IsLoading = false;
        });

        LoadChannelsCommand.Execute(null);
    }


    public ObservableCollection<ChannelViewModel> ChannelViewModels { get; private set; }
    public ObservableCollection<IAnnotationViewModel> Annotations { get; private set; }

    public string SelectedChannelType { get; set; }


    public ResamplingPrecision SelectedResamplingPrecision { get; set; }

    public int SelectedChannelCount { get; set; }

    public ActionCommand<object> ChangeChannelHeightCommand { get; }

    public ActionCommand AddChannelCommand { get; }

    public ActionCommand LoadChannelsCommand { get; }

    public long TotalPoints => ChannelViewModels.Sum(c => (long)c.DataCount);

    public bool IsLoading
    {
        get => _isLoading;
        set
        {
            _isLoading = value;
            OnPropertyChanged(nameof(IsLoading));
        }
    }

    public bool IsEmpty => ChannelViewModels.Count <= 0;

    public DoubleRange XRange
    {
        get => _xRange;
        set
        {
            _xRange = value;
            OnPropertyChanged(nameof(XRange));
        }
    }
}

+Attached image below is what i want to implement.
++I also attached tried code in .zip .

1 vote
15k views

Have a good day!

I’m working with render context in modifiers. I have this code snippet:

public override void OnParentSurfaceRendered(SciChartRenderedMessage e)
        {
            if (Mouse.LeftButton == MouseButtonState.Pressed&&IsEnabled)
            {
                if (ParentSurface == null) return;
                var yCalc = ParentSurface.YAxes.GetAxisById(TextOfYAxis);
                var startTVD = yCalc.GetDataValue(StartPoint.Y);
                var finalTVD = yCalc.GetDataValue(CurrentPoint.Y);
                var deltaTVD = Math.Round((double) finalTVD - (double) startTVD);
                var pen = e.RenderContext.CreatePen(Colors.Red,true,1);
                var brush = e.RenderContext.CreateBrush(Colors.Red);
                e.RenderContext.DrawLine(pen, StartPoint, new Point(StartPoint.X, CurrentPoint.Y));
                e.RenderContext.DrawEllipse(pen, brush, StartPoint, 4, 4);
                e.RenderContext.DrawEllipse(pen,brush,new Point(StartPoint.X,CurrentPoint.Y),2,2);
                e.RenderContext.DrawText(
                    new Rect(new Point(CurrentPoint.X - 20, CurrentPoint.Y - 20), new Size(100, 30)), Colors.Red, 10,
                    "Delta TVD:" + Math.Round(Geomodel.DeltaTVD + deltaTVD, 2));
                pen.Dispose();
            }
        }

My aim is to place rectangle below line series.
Is there any way to work with z-index of such method of drawing?

1 vote
2k views

How is it possible to sync SciChart with a ListView? The vertical chart grid should be the same width as the list view columns. A ScrollBar or a Chart-Overview should be used for synchronous scrolling of the X-axis and the ListView.

  • Tobias asked 2 years ago
  • last active 2 years ago
1 vote
15k views

I am currently playing with a Polar Plot that is from 0-360 degrees for it’s XAxis (phase). I am trying to determine the “next” coordinates on a keypress.

Currently I am trying:

        ModifierSurface.Clear();

        foreach (var series in this.ParentSurface.RenderableSeries)
        {
            var nextPhase = (double)series.DataSeries.XValues[_phaseIndex];
            var nextAmp = (double)series.DataSeries.YValues[_phaseIndex];

            var xCoordinate = series.XAxis.GetCurrentCoordinateCalculator().GetCoordinate(nextPhase);
            var yCoordinate = series.YAxis.GetCurrentCoordinateCalculator().GetCoordinate(nextAmp);

            DrawCursor(xCoordinate, yCoordinate, nextPhase, nextAmp);
        }

Unfortunately I am not getting the point coordinate I am expecting for drawing my next “cursor info” window.

_phaseIndex is currently 340, and I want to increment it to 341 and get the next X/Y pair location. But I can’t seem to get the location.

Any help would be great!

Thanks!
Geranon

1 vote
6k views

Hi. Is it possible to implement a depth chart like in the screenshot using scichart?! depth chart

1 vote
0 answers
11k views

Hi All,

Today’s weirdness was hard to track down but I can now demonstrate it with minimal code.

As a summary to the problem – we may generate multiple user controls each containing a chart that can’t all be viewed on screen at the same time. Our solution was to wrap everything in a ScrollViewer and allow the user to scroll through them. This caused the x Axis and any Right Aligned axis to do weird things with the chart.

On careful observation we noticed that any mouse movements in the axis while dragging were being interpreted as drags on the chart area so it would zoom (or pan) accordingly instead of dragging the Axis in question. Setting the scrollviewer scrollbar visibility to disabled returned the chart to expected behavior.

Can someone tell me what we did wrong or provide a work around suggestion.

The XAML:

<UserControl x:Class="WpfUITest.SciChartMultiaxisTest"
         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" `enter code here`
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
         mc:Ignorable="d" 
         xmlns:s="http://schemas.abtsoftware.co.uk/scichart" 
         d:DesignHeight="300" d:DesignWidth="300">
<Grid>
    <!-- <ScrollViewer CanContentScroll="False" VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Disabled">  THIS IS OK   -->
    <ScrollViewer CanContentScroll="False" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
        <Grid>
            <s:SciChartSurface x:Name="UserControlSciChartSurface" s:ThemeManager.Theme="Chrome" >
                <s:SciChartSurface.XAxis>                
                    <s:NumericAxis AxisAlignment="Bottom" AxisTitle="XAxis 1" GrowBy="0.01,0.01"/>            
                </s:SciChartSurface.XAxis>

                <s:SciChartSurface.YAxes>
                    <s:NumericAxis x:Name="Left1" Id="Left1" AxisTitle="Left Axis" AxisAlignment="Left" />
                    <s:NumericAxis x:Name="Right1" Id="Right1" AxisTitle="Right Axis" AxisAlignment="Right" />                        
                </s:SciChartSurface.YAxes>

                <s:SciChartSurface.ChartModifier>
                    <s:ModifierGroup>
                        <!-- <s:ZoomPanModifier x:Name="ZoomPanModifier" ExecuteOn="MouseLeftButton" />  -->
                        <s:RubberBandXyZoomModifier x:Name="rubberBandZoomModifier" ExecuteOn="MouseLeftButton"/>
                        <s:ZoomExtentsModifier x:Name="zoomExtentsModifier" ExecuteOn="MouseDoubleClick"/>                            
                        <s:XAxisDragModifier x:Name="xAxisDragModifier" IsEnabled="True" ClipModeX="None" />
                        <s:YAxisDragModifier AxisId="Left1" IsEnabled="True" />
                        <s:YAxisDragModifier AxisId="Right1" IsEnabled="True"/>
                    </s:ModifierGroup>
                </s:SciChartSurface.ChartModifier>
            </s:SciChartSurface>            
        </Grid>
    </ScrollViewer>
</Grid>

I put a simple test series on from the code behind as follows:

        public void AddTestDataSeries()
    {
        XyDataSeries<int, int> testSeriesData = new XyDataSeries<int, int> { SeriesName = "Series1" };
        for(int x = 1; x < 10; x++)
        {
            testSeriesData.Append(x, x);
        }
        FastLineRenderableSeries testSeries = new FastLineRenderableSeries();
        testSeries.DataSeries = testSeriesData;
        testSeries.YAxisId = "Left1";
        testSeries.SeriesColor = Colors.Red;
        this.UserControlSciChartSurface.RenderableSeries.Add(testSeries);
    }

Any ideas anyone?

1 vote
2k views

has anyone had an issue with this module?

LineSeriesDataLabelProvider

is supposed to be imported like this but is nowhere to be found:

import { LineSeriesDataLabelProvider} from 
 "scichart/Charting/Visuals/RenderableSeries/DataLabels/LineSeriesDataLabelProvider";

I’m taking this as example

https://demo.scichart.com/javascript-chart-metadata

I’m using angular

1 vote
13k views

Hello,

Do you have any further examples of binding the SciChart data series to a property of the items in an observable collection?

I have declared an Observable Collection made of objects called “Tab”:

public Observable Collection<Tab> TabList;

Each Tab has a property called “DataSeries”:

public XyDataSeries<double,double> DataSeries { get; set;}

I am trying to bind the SeriesSource property of the chart to the DataSeries property of every Tab.
The chart should be made up of multiple line series, one for every Tab in TabList.

My closest attempt was creating another object called ChartSeriesViewModel:

public class ChartSeriesViewModel : ViewModelBase
    {
        private ObservableCollection<IChartSeriesViewModel> _seriesSource =  new ObservableCollection<IChartSeriesViewModel>();

        public ObservableCollection<IChartSeriesViewModel> SeriesSource
        {
            get { return _seriesSource; }
        }
    }

Binding the chart to its SeriesSource property:

<sciChart:SciChartSurface DebugWhyDoesntSciChartRender="True" SeriesSource="{Binding ChartSeries.SeriesSource}" (...) />

And then populating it from each Tab.DataSeries :

_lineSeries = new FastLineRenderableSeries();
                foreach (Tab tab in TabList)
                {
                    tab.AppendSeries();
                    _chartSeries.SeriesSource.Add(new Abt.Controls.SciChart.ChartSeriesViewModel(tab.DataSeries, _lineSeries));
                }

When I did this is seemed like the DataSeries were created but not linked to the RenderableSeries as the chart debug gave the error: “none of the SciChartSurface.RenderableSeries has a DataSeries assigned”.

I would prefer to have the SeriesSource binded directly to the DataSeries property of every Tab item instead of populating another object from Tab.DataSeries as the second method won’t allow live chart update.

Regards,
Simon.

1 vote
2k views

Hi,

New to using Scichart JS, is it possible to change the series colour of the overview chart?

See screenshot, I have a FastColumnRenderableSeries as the main chart, and using FastMountainRenderableSeries for the overview. I would like to change the colour of the overview chart.

Tried setting the stroke colour etc, as in the example but can not seem to make it work.

Kind Regards,

James

1 vote
8k views

Hi,
I’m trying to synchronize the pie chart and the line chart in React. I’ve already done this for two line graphs.

They both use the same data table. And I want to know if it’s possible, if when I zoom in on the line chart, it updates the Pie chart with the new range.

Thanks, (sorry for my english ^^)

  • thier tom asked 1 year ago
  • last active 1 year ago
1 vote
2k views

Hi~
I am trying to create a plot that animates ODS (Operating Deflection Shape) using FRF (Frequency Response Function) data. Is ODS animation possible using scichart’s gemoetry 3D plot?
Thanks.

  • kim2 kim asked 12 months ago
  • last active 12 months ago
1 vote
6k views

I am working on a multithreaded application where the acquisition and chart display run on different threads. I am attempting to collect samples and plot only when I have 100 samples available to have less resource consumption and keep the application responsive. However, when I change the number of samples in the block, my FIFO capacity seems to change, allowing significantly less amount of samples than the ones I need. The current FIFO capacity should allow for at least 16 mins worth of data, but it only shows less than a second

If I set the block size to 1 (single sample appending) I obtain the results I need, but I am seeing performance issues in other areas of the program, hence the need of appending in blocks.

See the attachments for more clarity. Any suggestions?

EDIT: Adding code

private void DisplayNPD()
        {
            XyDataSeries<float, float> npdRawDataSeries = new XyDataSeries<float, float>();
            int fifoSize = 1000000;
            npdRawDataSeries.FifoCapacity = fifoSize;
            npdRawData_RS.DataSeries = npdRawDataSeries;

            double npdRaw = 0;
            bool successfulDequeue = false;
            int samplesQueued = 0;
            int samplesInBlock = 100;
            float[] rawSamples = new float[samplesInBlock];
            float[] time = new float[samplesInBlock];

            while (!ImagingSession.terminateThreads)
            {
                if (ImagingSession.laserOnOff && !graphRestarted)
                {
                    int npdElementsInQueue = npdDisplayQueue.Count;
                    if (npdElementsInQueue > 0)
                        successfulDequeue = npdDisplayQueue.TryDequeue(out npdRaw);

                    if (successfulDequeue)
                    {
                        currentTime = graphStopwatch.ElapsedMilliseconds * 0.001;
                        time[samplesQueued] = (float) currentTime;
                        rawSamples[samplesQueued] = (float) (npdRaw * 1000);

                        samplesQueued++;
                        if (samplesQueued == samplesInBlock)
                        {
                            using (npdRawDataSeries.SuspendUpdates())
                                npdRawDataSeries.Append(time, rawSamples);
                            samplesQueued = 0;

                            if (currentTime > upperLimit)
                            {
                                lowerLimit = upperLimit;
                                upperLimit += xAxisWidth;
                                AdjustXAxis(currentHorizontalScale);
                            }
                        }
                    }
                }
            }
        }
1 vote
5k views

Hi,

I want to change the grid distance between the two slices dynamically in both X , Y and Z direction. But whatever the value I set for StepZ and StepX, nothing changes in the output. I still see the same graph.

Please can you suggest if there is any way to achieve this.

I am attaching the code of waterfall example here.

1 vote
6k views

Sorry for opening another question, but this followup to https://www.scichart.com/questions/js/series-labels got missed.

I’m looking to add a border and background to a TextAnnotation.

Back in the WPF days we had the ability to pretty easily add background colors and such to annotations, thanks to the existing WPF model. I’m assuming in the JS example this would be custom; do you have any existing code/examples for that? Looking for being able to use a colored box whose fill matches the renderable series stroke, along with a contrasting text color.

Dan

1 vote
0 answers
10k views

Hi,

I previously asked a question about a flickering chart. (https://www.scichart.com/questions/question/flickering-chart)

After stripping down my application I think I have found the root cause, and the information in that question seem to be completely irrelevant. If it is ok I’d rather delete that question.

I have extracted the relevant code out of my application and put it in the attached test application. After clicking the start button data should be added in real time. To reproduce change the visible area to a part of the chart and then hold to right scrollbar grip and move it, don’t release, just hold still, the chart starts to flicker.

1 vote
1k views

Hi!

I have chart with mountain series with a palette provider.
It performs extremely well with 50k points.

However, I noticed that when I drag the chart away, to a point where the series is not visible, the performance sinks and the chart is extremely laggy.

I have uploaded my code to codepen: https://codepen.io/robrob123/pen/KKJjyvp

I checked the performance using the chrome performance profiler and I found that a function called applyStrokeFillPalletting is called repeatedly many times and each time it takes way too long to execute, considering there is no series to draw.

I have attached a screenshot showing the performance profiling.

Thank you!

1 vote
8k views

Hello!

Great work, thanks a lot for this framework!

Could you provide an example of animated inserting of a new point? My goal is to implement interpolation between previous retrieved and last point on the real-time line chart.

Showing 101 - 150 of 4k results