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

0 votes
89 views

Previously I used AnnotationCreationModifier and my custom annotations were added by one left button mouse click on the chart surface (the annotation was added to the collection and the event handler “AnnotationCreated” fired). Now I’m trying to switch to using the mvvm pattern and I have problems adding my custom annotations using AnnotationCreationModifierMVVM.

Now it works like this:
1) I click (mouse left button) on the chart surface to add an annotation and it is added to the collection and displayed.
2) I click on the chart surface again, and only after that the event handler “AnnotationCreated” is called.

If I carry out some external manipulations with the added annotation between first and second click (for example, moving to the given coordinates by the button click), annotation moved, but when I hover the mouse over the chart surface, it returns to it’s original position. And this behavior will be until I click again on the chart surface so that the event handler “AnnotationCreated” is called.

The built-in annotations work fine though (for examle, VerticalLineAnnotationViewModel or HorizontalLineAnnotationViewModel are successfully added to the collection and call the event handler “AnnotationCreated” by one click on chart surface).

Is it possible to somehow fix this behavior of the custom annotation so that it is added to the collection and triggers an event “AnnotationCreated” for one click on the chart surface, as was the case with AnnotationCreationModifier? I am attaching an example code:

MainWindow.xaml

<Window x:Class="WpfAppMvvm.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:s="http://schemas.abtsoftware.co.uk/scichart"
    xmlns:ext="http://schemas.abtsoftware.co.uk/scichart/exampleExternals"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    mc:Ignorable="d"
    Title="MainWindow" Height="450" Width="800">
<Grid>
    <s:SciChartSurface Annotations="{s:AnnotationsBinding Annotations}">
        <s:SciChartSurface.XAxis>
            <s:NumericAxis AxisTitle="X"/>
        </s:SciChartSurface.XAxis>
        <s:SciChartSurface.YAxis>
            <s:NumericAxis AxisAlignment="Left" AxisTitle="Y"/>
        </s:SciChartSurface.YAxis>
        <s:SciChartSurface.ChartModifier>
            <s:ModifierGroup>
                <s:AnnotationCreationModifierMVVM IsEnabled="True" AnnotationViewModelsCollection="{Binding Annotations}" AnnotationViewModelType="{Binding AnnotationType}">
                    <i:Interaction.Behaviors>
                        <ext:EventToCommandBehavior Command="{Binding AnnotationCreatedCommand}" Event="AnnotationCreated" PassArguments="True"/>
                    </i:Interaction.Behaviors>
                </s:AnnotationCreationModifierMVVM>
            </s:ModifierGroup>
        </s:SciChartSurface.ChartModifier>
    </s:SciChartSurface>
</Grid>

MainWindow.xaml.cs

using System.Windows;
namespace WpfAppMvvm
{
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            DataContext = new MainWindowViewModel();
        }
    }
}

MainWindowViewModel.cs

using SciChart.Charting.ChartModifiers;
using SciChart.Charting.Common.Helpers;
using SciChart.Charting.Model.ChartSeries;
using SciChart.Examples.ExternalDependencies.Common;
using System;
using System.Collections.ObjectModel;
using System.Windows;
namespace WpfAppMvvm
{
    internal class MainWindowViewModel:BaseViewModel
    {
        public ObservableCollection<IAnnotationViewModel> Annotations { get; private set; }
        public Type AnnotationType { get; private set; }
        public ActionCommand<AnnotationCreationMVVMArgs> AnnotationCreatedCommand { get; private set; }

        public MainWindowViewModel()
        {
            Annotations = new ObservableCollection<IAnnotationViewModel>();
            AnnotationType = typeof(MyCustomAnnotationViewModel);
            AnnotationCreatedCommand = new ActionCommand<AnnotationCreationMVVMArgs>(ExecCmd, e => true);
        }
        private void ExecCmd(AnnotationCreationMVVMArgs e)
        {
            MessageBox.Show("OnAnnotationCreated executed");
        }
    }
}

MyCustomAnnotation.xaml

<s:CustomAnnotationForMvvm x:Class="WpfAppMvvm.MyCustomAnnotation"
         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" 
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
         mc:Ignorable="d" 
         xmlns:s="http://schemas.abtsoftware.co.uk/scichart"
         d:DesignHeight="450" d:DesignWidth="800">
<Grid>
    <Ellipse
        Width="20"
        Height="20"
        Fill="Transparent"
        Stroke="Red"
        StrokeThickness="3"
    />
</Grid>

MyCustomAnnotation.xaml.cs

using SciChart.Charting.Visuals.Annotations;

namespace WpfAppMvvm
{
    public partial class MyCustomAnnotation : CustomAnnotationForMvvm
    {
        public MyCustomAnnotation()
        {
            InitializeComponent();
        }
    }
}

MyCustomAnnotationViewModel.cs

using SciChart.Charting.Model.ChartSeries;
using System;

namespace WpfAppMvvm
{
    public class MyCustomAnnotationViewModel:CustomAnnotationViewModel
    {
    public override Type ViewType => typeof(MyCustomAnnotation);
    }
}
1 vote
123 views

Hello,

I am trying to make a legend for a graph with some complex data.

Here is an example of how my data is structured:

  • Data Set #1
    • Series A
    • Series B
    • Series C
  • Data Set #2
    • Series A
    • Series B
    • Series C
  • Data Set #3
    • Series A
    • Series B
    • Series C

By default, SciChartLegend will display 9 entries in the above example, one for every series. However, with many datasets, and more series per dataset, this quickly becomes extremely cumbersome.

What I’d like to do is show 6 items in the legend: a checkbox for each Data Set, and a checkbox for each Series Type.

If the user clicks the Data Set #1 check box => Data Set #1 Series A, Data Set #1 Series B, and Data Set #1 Series C are all shown/hidden.

If the user clicks the Series A check box => Data Set #1 Series A, Data Set #2 Series A, and Data Set #3 Series A are all shown/hidden.

This does not seem to cooperate with the native SciChartLegend, which views all the Data Series as a single flat list. My data is in more of a tree structure.

Do you have any recommendations on how to proceed? I think I will need to make a new UserControl derived from ChartDataObjectBase to replace the SciChartLegend control.

Any help greatly appreciated.

Thank you,

Kurt

1 vote
134 views

Hello,

I am trying to make a custom user control for the legend. I’d like to have a file, like MyLegend.xaml, along with a MyLegendViewModel.cs, which can be referenced in a larger view containing the associated surfaces, MyBigChartView.xaml / MyBigChartViewModel.cs. I can’t find any examples of this. Everything I’ve seen is about declaring an ItemTemplate or DataTemplate…

Can anyone point me towards a very simple example of using a custom xaml control to define the legend and then using that in another large xaml view?

1 vote
162 views

I upgraded to the latest version of Scichart (v6.6.0.26505) WPF. Found that deleting vertical slice annotation no longer works. This is happening in the example suite (Using Vertical Slice Tooltips) as well. When you delete it, the vertical line remains while the labels disappear. However, when you move the mouse over, the labels reappear again.

Any fix for that?

Thanks

Ning

  • Ning Qiang asked 3 weeks ago
  • last active 3 weeks ago
1 vote
207 views

This might be a feature request, I don’t know. Basically, I’m trying to plot a 3D scatter-plot and programmatically insert an arbitrary number of partially transparent free surface meshes in the same area as the scatter-plot. I started small and made some spheres. Some of my points are inside the spheres. These points are important, and I have my own functions that detect collisions between points and the spheres. The scatter-plot is also dynamic, where I update the color and transparency of the points and this means something. When all of the points are completely opaque, I get the desired behavior where I can see the points inside and behind the partially transparent meshes. However, when I make even one point transparent, all of the points inside and behind the mesh stop rendering. This is really annoying. Deletion is too slow. Is there anyway to force these fully opaque points to continue to render inside the partially transparent mesh while their brothers in the scatter-plot data series are transparent?

Second question, while I’m here. I’ve bolted a UI to the side of the Sci-Chart environment. What is the best way to make sure that the UI stays responsive even if the Sci-Chart environment starts to slow down? I want to crank up the point count past any reason.

https://www.youtube.com/watch?v=0IBBG6WEQw8 I’ve also uploaded a video of my problem. Before I check the box “Draw Geo-fence Violations Only”, all points in the data series 100% not transparent. When I check the box, all the white points start to become 100% transparent. When I click “Draw Geo-fences”, the meshes become 100% transparent (it’s backwards I know). The points are obviously still within the bounds of the mesh, as when the I turn off the mesh they start rendering. You can also see some red dots outside the mesh, as my program flagged a few points right next to the mesh as being inside it. These red dots outside the mesh render even when the red dots inside the mesh don’t.

0 votes
191 views

I want to visualize the octave band.
How can I visualize it?

1 vote
253 views

Dear SciChart team,

We have been subscribing SciChart WPF 2D Pro for a few years, usually I made some WPF user controls which have SciChartSurface in it, and we use it to display some data in the form of charts. Since my colleagues do not have the developer’s license, so they can’t see these charts on their laptop when they were debugging the solution, but it was fine, they do not care the charts.

Last week I updated the SciChart on my laptop, it works fine on my PC. but it always crashed when my colleagues debugging the solution.

The error info is:
Cannot attach VerticalLineAnnotation, because it is already used.

The call stack is full of SciChart’s calling

at SciChart.Charting.ChartModifiers.VerticalSliceModifier.sfp(VerticalLineAnnotation hhv)
at SciChart.Charting.ChartModifiers.VerticalSliceModifier.sge()
at SciChart.Charting.ChartModifiers.VerticalSliceModifier.OnAttached()
at SciChart.Charting.ChartModifiers.ModifierGroup.geq(IChartModifier gwl)
at SciChart.Core.Extensions.EnumerableExtensions.ForEachDo[T](IEnumerable1 enumerable, Action1 operation)
at SciChart.Charting.ChartModifiers.ModifierGroup.gep(IEnumerable`1 gwk)
at SciChart.Charting.ChartModifiers.ModifierGroup.OnAttached()
at SciChart.Charting.Visuals.SciChartSurface.sjj(IChartModifier anx)
at SciChart.Charting.Visuals.SciChartSurface.sht()
at SciChart.Charting.Visuals.SciChartSurface.OnSciChartSurfaceLoaded()
at SciChart.Charting.Visuals.SciChartSurfaceBase.gtm(Object aqg, RoutedEventArgs aqh)
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)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
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 MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(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 ABB.Motion.WorkBench.App.Main()

  • Chris Chen asked 1 month ago
  • last active 1 month ago
1 vote
257 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 months ago
  • last active 1 month ago
1 vote
258 views

Working app suddenly getting System.Windows.Markup.XamlParseException: ‘Provide value on ‘System.Windows.Baml2006.TypeConverterMarkupExtension’ threw an exception.’
Inner Exception
FileNotFoundException: Could not load file or assembly ‘SciChart.Charting.DrawingTools, PublicKeyToken=b55dd9efe817e823’ or one of its dependencies. The system cannot find the file specified.

I am on a Windows 10 machine that looks like it just did a Windows Update…any thoughts on what this is?

1 vote
276 views

Hi,

I’m learning SciChart, and tried following this tutorial https://www.scichart.com/example/wpf-chart/wpf-3d-chart-example-add-objects-to-3d-chart/. I tried adding a mesh I generated in blender, as well as using the knight piece from the same source as the example. It looks to me like the normal vectors on the objects are inverted. This is definitely not a problem with my model, as multiple other .obj viewers don’t have a problem displaying my mesh, and the knight piece isn’t mine anyway. I exported the example into Visual Studio and it worked fine, all the pieces were solid. Does anyone have any idea what I’ve goofed here?

1 vote
284 views
MC3074  XML 네임스페이스 'http://schemas.abtsoftware.co.uk/scichart/exampleExternals'에 'EnumValueToStringConverter' 태그가 없습니다. 줄 26 위치 10. SciChart.Examples   C:\Users\YHS\Downloads\SciChart.Wpf.Examples-SciChart_v6_Release\SciChart.Wpf.Examples-SciChart_v6_Release\Examples\SciChart.Examples\Examples\Charts3D\CreateA3DChart\CreateACustomFreeSurface3DChart.xaml 26  

Tags that cause problems
xmlns:ext=”http://schemas.abtsoftware.co.uk/scichart/exampleExternals”

I am developing using Sci Chart for the first time.
My head hurts with license issues and tag issues.
I hope this is resolved smoothly.

1 vote
341 views

Hi Team,

I am getting the error message Sorry! your trail of schichart has expired message is coming on the end user PC through we have purchased the developer license and activating the schichart using the runtime key provided in my account. Gone through the steps provided in here .

Also checked if there are any spaces in the license key. FYI, my developer license is expired and using the v5.4 with nuget.

0 votes
0 answers
273 views

Some of our users are reporting the following error when installing SciChart WPF v6.6

Failed to uninstall old application files. Please try running the installer again

enter image description here

This issue occurs when an older (pre v6.6) version of SciChart has been installed and trying to re-install version 6.6.

The solution for this is:

  • To go into Control panel and Add or remove programs.
  • Make sure both the SciChart SDK and the SciChart Licensing Wizard are uninstalled.
  • Then try to install SciChart WPF v6.6 again

Please comment below if you experience this problem & the above solution did not work.

Thanks and regards,
Andrew

1 vote
298 views

Hi,
I started the WPF trial version today(must be the newest version). I used the Example demo to export code. But I can not compile it. Please see the attached images. I did run “dotnet restore” from NuGet Package Manager->Package Manager Console. It didn’t help. In the solution explorer, there is yellow mark beside Packages.

What should I do to compile the exported sample?

Thanks
Rosalind

1 vote
307 views

Hi,

I’m trying to add point markers to a scatter series that have transparent fill and coloured stroke. It works but the behavour of the stroke thickness isn’t quite as expected.

Any thickness about 1 starts to clip the square that the sprite is drawn in, making ellipses look square.

SquarePointMarker only seems to draw the stroke on the top and left sides.

TrianglePointMarker clips the stroke at the top and bottom.

I can’t seem to find any other properties that might change this. Padding seems to have no effect.

The following code gereates the point markers:

public static IPointMarker CreatePointMarker(PointMarkerTypes pointType, double size, double strokeThickness, Color fill, Color stroke)
        {
            // Square
            if (pointType == PointMarkerTypes.Square)
            {
                var square = new SquarePointMarker()
                {
                    StrokeThickness = strokeThickness,
                    Stroke = stroke,
                    Fill = fill,
                    Height = size,
                    Width = size,
                };

                return square;
            }

            // Triangle
            if (pointType == PointMarkerTypes.Triangle)
            {
                var triangle = new TrianglePointMarker()
                {
                    StrokeThickness = strokeThickness,
                    Stroke = stroke,
                    Fill = fill,
                    Height = size,
                    Width = size
                };

                return triangle;
            }

            // Inverse Triangle
            if (pointType == PointMarkerTypes.InverseTriangle)
            {
                var invTriangle = new InvertedTrianglePointMarker()
                {
                    StrokeThickness = strokeThickness,
                    Stroke = stroke,
                    Fill = fill,
                    Height = size,
                    Width = size
                };

                return invTriangle;
            }

            // X
            if (pointType == PointMarkerTypes.X)
            {
                var x = new XPointMarker()
                {
                    StrokeThickness = strokeThickness,
                    Stroke = fill,
                    Fill = fill,
                    Height = size,
                    Width = size
                };

                return x;
            }

            // Cross
            if (pointType == PointMarkerTypes.Cross)
            {
                var cross = new CrossPointMarker()
                {
                    StrokeThickness = strokeThickness,
                    Stroke = fill,
                    Fill = fill,
                    Height = size,
                    Width = size
                };

                return cross;
            }

            // Circle
            else
            {
                var circle = new EllipsePointMarker()
                {
                    StrokeThickness = strokeThickness,
                    Stroke = stroke,
                    Fill = fill,
                    Height = size,
                    Width = size,
                };

                return circle;
            }
        }
0 votes
326 views

Hello,
When my program runs for a while, the lines disappear. I check the dataseries, it does not have NAN data, and the data is correct.
It can happen twice a week.

Best regards,
YXJ

  • YXJ YXJ asked 3 months ago
  • last active 3 months ago
1 vote
435 views

I am currently following the tutorial at the page listed here.

https://www.scichart.com/documentation/win/current/webframe.html#Tutorial%2003b%20-%20Adding%20Series%20to%20a%20Chart%20with%20MVVM.html

Instead of using the given values to add to the series, I am using very small values like so:

var lineData = new XyDataSeries<double, double>() { SeriesName = "Testing Series" };
lineData.Append(0, 0);
lineData.Append(1, 0.001);
lineData.Append(2, 0.002);

However the axis ticks do not display a high enough resolution as shown in the image attached. Each one will show either 0, 0.001 or 0.002 and no further. I have tried changing the axis MinorDelta and MajorDelta to smaller values but this has not worked. Is there any way to fix this?

  • Hamza Butt asked 3 months ago
  • last active 3 months ago
1 vote
485 views

Hello,
I’ve got Annotations ViewModels collection (BoxAnnotationViewModel, VerticalLineAnnotationViewModel, LineAnnotationViewModel) bound by AnnotationsBinding. Every Annotation ViewModel has properties set to:

CoordinateMode = AnnotationCoordinateMode.Absolute
IsEditable = true
DragDirections = XyDirection.XYDirection
ResizeDirections = XyDirection.XYDirection

My goal is to move and resize every annotation on SciChart surface only by integer value. Is there any way to achieve this?

Best regards,
Anna

1 vote
424 views

Hi I am trying to add annotation to Linechart example.
I get the error in the image

1 vote
417 views

Hello,

I am trying to change the frequency range in the Y axis on the Heatmap to 100000 from 50000, but the plot does not seem to be working to scale to the proper frequency range on the Y axis. I expect the plot to keep the same scale around 20000 for the upper line when I change the upper scale to 100000, but the graph scales the upper line up to 40000. I’m using function Heatmap2DArrayDataSeries() and passing the series data along with TimeFunc() for mapping to X axis and FreqFunc() for mapping to Y axis. I made some changes to FreqFunc(), but it did not change the upper line to 20000. See below for my partial code. Thanks,

    protected override void OnDisplayLoaded()
    {
    ...
    ...
        _dopplersurface.YAxes[0].VisibleRange = YVisibleRange2; // YVisibleRange2 = {0, 100000}
        _surface.UpdateLayout();

    }

    private void PlotData()
    {
    ...
        ...
        heatmap2DArrayDataSeries = new Heatmap2DArrayDataSeries<DateTime, double, double>(_spectrogramBuffer, TimeFunc, FreqFunc);
        HeatmapRenderableSeries = heatmap2DArrayDataSeries;
    }

    double FreqFunc(int iy)
    {
        double FreqDelta = 1.0 / (time_queue[1] - time_queue[0]).TotalSeconds / (FFT_Points / 2.0);
        if (((FFT_Points / 2.0) * FreqDelta / 2) < (double)YVisibleRange2.Max); // FFT_Points = 1024
        {
            FreqDelta = FreqDelta * 2;
        }
        return iy * FreqDelta / 2; // Returns 0 if iy is 0 and 50000 if iy is 512
    }

    DateTime TimeFunc(int ix)
    {
        if (time_queue.Count > (ix * Step))
        {
            DateTime DateTimeTemp1 = time_queue[ix * Step];
            return DateTimeTemp1;
        }
        else
        {
            return time_queue[time_queue.Count - 1];
        }
    }
  • Hoa Duong asked 3 months ago
  • last active 2 months ago
1 vote
435 views

I modified the source of Example to create a Hemisphere and painted it with ISurfaceMeshPaletteProvider3D.

  1. public Color? Are the xindex, zindex of the OverrideCellColor(IRenderableSeries3D series, int xIndex, int zIndex) function not U, V?
  2. The part painted in red comes out in blue. What is the mean of xindex and zindex?

+I attached my source code.

1 vote
393 views

Hi, I want to render some noise hemisphere like attached image.
How can i draw like this?

1 vote
545 views

Hi,

I have used WPF Chart Vertically Stacked YAxis example:
WPF Chart Vertically Stacked YAxis | Fast, Native, Charts for WPF (scichart.com)

and WPF Chart Multiple YAxis example:
WPF Chart Multiple YAxis | Fast, Native, Charts for WPF (scichart.com)

I have managed to achieve both individually but now essentially I would like to combine them.

I have been trying to alter the Right Axes Panel Template to allow this but it seems to only allow one or the other.

My main difference from the examples is that I have a collection of Yaxes of NumericAxisViewModel type in my viewmodel that is decided by the user at runtime before creating the chart and so is not defined in the xaml and bound with the YAxes property on the surface using AxesBinding.

I want to be able to vertically stack some of the Yaxes and have the rest stack horizontally side by side on the same axis alignment side, in my case the right side.

Is this something that is possible? If so how do I achieve this?

Let me know if you need any more info.

Cheers,
Grahame

1 vote
416 views

I have some 3 dimension data that I have successfully generated a 3D surface mesh chart out from in WPF. However, I want to generate a 2D plot from the 3D chart given some parameters (e.g. a x-value, a y-value etc.). Can anyone advise on the best way to extract a 2D plot from a 3D chart?

  • Gil Owu asked 3 months ago
  • last active 3 months ago
0 votes
0 answers
514 views

Hi there

I’m using Column Chart with LogarithmicNumericAxis for the Y axis. I noticed a crazy thing that the baseline in my chart is set to 1*E-5 by default and not modifiable.

Is there any way to change this baseline?

0 votes
431 views

I have some FastLineRenderableSeries that display the user’s real time data.
I let the user set a trigger for a specific line and when the line crosses the trigger value the SciChartSurface freezes.
I would like to add that when this happens, the activated point will be highlighted or mark in a way the user will see exactly where it is…
Is there a simple way to do this?

(the orange line is the trigger…)

0 votes
444 views

There are multiple Y axes in my chart. I am displaying grid lines only for the primary axis and I would like to change its color. Please let me know how it might be possible.
I have tried style and it works for X axis (single axes) but doesn’t for Y axes (multiple)

    <Style x:Key="MajorGridLineStyle" TargetType="Line">
        <Setter Property="Stroke" Value="Red"/>
    </Style>


        <s:SciChartSurface.XAxis>
            <s:NumericAxis AxisTitle="{Binding XAxisTitle}" DrawMajorBands="False" DrawMinorGridLines="False" DrawMinorTicks="False"
                           MajorGridLineStyle="{StaticResource MajorGridLineStyle}"/>
        </s:SciChartSurface.XAxis>

I have also tried majorgridlinebrush in my viewmodel but it doesn’t work. Some default color is show for the gridlines

        YAxes.Add(new NumericAxisViewModel
        {
            DrawMajorBands = false,
            DrawMinorGridLines = false,
            DrawMinorTicks = false,
            MajorGridLinesBrush = new SolidColorBrush(Colors.Red)
        });
1 vote
534 views

Sorry. My English is not good.

I have to mapping “Connector” image to 3D Cylindroid Chart.
But I do not know how.

Please let me know

1 vote
479 views

SelectedSeriesModifier gets applied only on click (i guess that sets the isselcted). I found the ExecutesOn property that work on MouseMove.

However, I am unable to bind the strokethickness (I cannot use static/hardcoded values as strokethickness is decided by the user and I need to increase it by 1 when user hovers over the series).

Binding evaluation throws following error and crashes – WPF ‘System.Windows.Data.Binding’ is not a valid value for property ‘StrokeThickness’

                        <s:SeriesSelectionModifier ExecuteOn="MouseMove">
                            <s:SeriesSelectionModifier.SelectedSeriesStyle>
                                <Style TargetType="s:BaseRenderableSeries">
                                    <Setter Property="StrokeThickness" Value="{Binding Path=StrokeThickness, diag:PresentationTraceSources.TraceLevel=High}"/>
                                </Style>
                            </s:SeriesSelectionModifier.SelectedSeriesStyle>
                        </s:SeriesSelectionModifier>
1 vote
528 views

Please see attached chart that my users will be seeing.

Y axis range is from 0 to 100. Notice the axis labels, these are all aligned with other major grid lines but for the ones at the top and the bottom.

Please let us know if and how we can fix it.

0 votes
436 views

Hello, I have the Boxplot working (in WPF) using Dates as X-Axis.

But if I try to use String values, I get the following exception:

‘La invocación del constructor del tipo ‘ReservoirAnalytics.Windows.Boxplots’ que coincide con las restricciones de enlace especificadas produjo una excepción.’ (número de línea: ’16’; posición de línea: ’10’).

Cannot create a DataDistributionCalculator for the type TX=System.String

Esta es la línea:
var boxDataSeries = new BoxPlotDataSeries<string, double>();

1 vote
698 views

I have the following (attached) scatter chart, which contains normalized positions in an ellipse shape.
Since my chart isn’t squared the x-Axis stretches longer than the y-axis, even though they both range from 0-1.
Is there any way to “squash” down the x-axis so the data will be display in their true circle shape?

1 vote
593 views

Hey everybody,
is it possible to create Charts like the one I’ve attached?
Basically I wanna show some statistics about my AI labeling data, and the rectangles shown are the bounding boxes
of said labeled data. The rectangles have to be stationary and not moveable (unlike rectangular annotations).
The data will be available in a normalized format.

0 votes
460 views

ShowLabel =TRUE does not take effect the first time

1 vote
631 views

Please answer.

When upgrading from 6.5.0.13720 to 6.5.1.26063, an error now occurs.
This does not occur with 6.5.0.13720.

The error seems to occur just before drawing the graph.
The errors that occur are as follows.

Exception: System.AccessViolationException: Attempted to read or write
protected memory. This is often an indication that other memory is
corrupt.

SciChart.Charting2D.Interop.SCRTWPFInterop.CreateRenderTarget(int,
int)
SciChart.Drawing.VisualXcceleratorRasterizer.VisualXcceleratorRenderSurface.RecreateSurface()
SciChart.Drawing.Common.RenderSurfaceBase.hpy(object, System.Windows.SizeChangedEventArgs)
System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, object) at: RoutedEventArgs.cs
System.Windows.RoutedEventHandlerInfo.InvokeHandler(object, System.Windows.RoutedEventArgs) at: RoutedEventHandlerInfo.cs
System.Windows.EventRoute.InvokeHandlersImpl(object, System.Windows.RoutedEventArgs, bool) at: EventRoute.cs
System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject,
System.Windows.RoutedEventArgs) at: UIElement.cs
System.Windows.FrameworkElement.OnRenderSizeChanged(System.Windows.SizeChangedInfo)
at: FrameworkElement.cs
System.Windows.ContextLayoutManager.fireSizeChangedEvents() at: LayoutManager.cs
System.Windows.ContextLayoutManager.UpdateLayout() at: LayoutManager.cs

This does not happen if you reduce the amount of data displayed on the graph.

Even if the following processing was implemented just before the error occurred, it did not improve.

Would you like to teach me how to improve and the changes in the version upgrade?

0 votes
0 answers
485 views

I want to customise BrightSpark theme from scratch.

In the page below, there is SciChartv4Dark theme’ s xaml.
https://www.scichart.com/documentation/win/current/webframe.html#Creating%20a%20Custom%20Theme.html

Can I get same thing for BrightSpark theme?

1 vote
509 views

There is a tabcontrol with two tabitems. Scichart control is in one tabitem, the xy line renderable series of scichart control count is about 5000, and each series has 2000 datas.
At the start, I load and show the scichart curves with loading icon, and it run normally. Then, change to the other tabitem. When I change back to the scichart tabitem , it will taken about 10 secends.
How to reduce the reshow time? Or is there any event occurs when reshow finished which I can used to show loading icon?

  • Shao Lin asked 4 months ago
  • last active 4 months ago
1 vote
515 views

Hello! This might be a silly question, but if I were to get a new MacBook running the M1-series processor, and ran Windows ARM preview in Parallels, do I have any chance of getting SciChart to work? I can see here that Visual Studio ARM will compile x86 and x64, but will SciChart work? I have no way to test this so hopefully someone else has!

https://docs.microsoft.com/en-us/visualstudio/install/visual-studio-on-arm-devices?view=vs-2022

1 vote
517 views

Currently I am trying to enable the default measurement (if present) or need to pass a custom measurement along with values to the axis to plot (if not default available). e.g. x-axis: 50V, y-axis: 50ft, z-axis: 50U

Is there any other possible way to do this in Scichart, If so, please let me know how to do?

Please refer the attached image for your reference.

Thanks in advance.

  • Barani G asked 4 months ago
  • last active 4 months ago
1 vote
513 views

Is there any way Gantt Chart be plotted based on the dynamic data.
The example https://www.scichart.com/example/wpf-chart/wpf-chart-example-gantt-chart/ shows plotting Graph using predefined data loaded through constructor.
In the same example if a new item is added dynamically to the Item Collection in the View-Model it should reflect in the Graph.

Also how to plot the graph if a single project has multiple timeline.

  • Santhosh M asked 5 months ago
  • last active 4 months ago
-1 votes
444 views

why show incorrectly

  • YXJ YXJ asked 5 months ago
  • last active 5 months ago
1 vote
536 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
484 views

I spent all day on this one and was reluctant to ask but despite all my efforts here I am asking this question in the forum. This started with an undesirable behavior when showing/hiding the point markers on my series. When my series is being displayed on the legend AFTER the legend is already visible the point marker is “sort of displayed”, meaning you can see a small missing piece of the series line in the legend as if a point marker is there. But, it is not. If I select another series on my chart after I have elected to show the legend and point markers this problem doesn’t exist. I’d prefer not to get into the depths of the view model for which I am binding my series to the SciChart and instead focus on why I am unable to access information in the s:SeriesInfo that I assume should be available.

Basically I want to build my own custom legend and it’s simply not working as I would expect. The only thing that is binding with success is the SeriesName. See the following example.

<s:LegendModifier.LegendItemTemplate>
<DataTemplate DataType="{x:Type s:SeriesInfo}">
    <StackPanel Orientation="Horizontal">

        <Rectangle Height="2" Width="120" Fill="{Binding RenderableSeries.Stroke}" />

        <Ellipse Width="10" Height="10">
            <Ellipse.Style>
                <Style TargetType="{x:Type Ellipse}">
                    <Setter Property="Stroke" Value="{Binding RenderableSeries.Stroke}" />
                    <Setter Property="Fill" Value="{Binding RenderableSeries.PointMarker.Fill}" />
                    <Setter Property="StrokeThickness" Value="1" />
                    <Setter Property="Margin" Value="10,0,10,0" />
                    <Setter Property="Visibility" Value="Visible" />
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding Path=ShowPoints, Mode=TwoWay}" Value="True">
                            <Setter Property="Visibility" Value="Visible" />
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </Ellipse.Style>
        </Ellipse>

        <TextBlock Text="{Binding RenderableSeries.DataSeries.SeriesName}" />
    </StackPanel>
</DataTemplate>

</s:LegendModifier.LegendItemTemplate>

Nothing. Despite reading pages and articles/posts on SciChart’s website I have run into a wall and decided to ask for help.

0 votes
491 views

Recently a customer asked us on a support ticket:

We are trying to free the memory used by SciChart but it seems like
there is a large amount of memory still held somewhere in the code.
Attached

Bug scenario:

  1. Run the 50-Channel EEG Example
  2. Start the UI, With task manager memory usage is around 40 MB.
  3. Press Run, memory usage increase to ~130 MB.
  4. Press Stop, memory usage remains the same (around 130 MB).
  5. Call the garbage collector manually, on the second call of the garbage collector the memory stays above 100 MB.

How can we release the memory allocated by a DataSeries in SciChart WPF?

1 vote
734 views

hi:
As shown below, I want to fill different colors between the two lines according to my own rules,

I first adopted scheme 1: use FastBandRenderableSeries, but it has default rules, according to the size of Y1 and Y2, fill between Y1 and Y2 Predefined FillY1 and FillY2; 
I can't change this behavior by implementing IFillPaletteProvider. 
So I switched to Scenario 2: Use two FastLineRenderableSeries to form the band, but I don't know how to fill the color between the two FastLineRenderableSeries.
Does scichart support filling color between two lines according to custom rules?   my scichart version is 6.3.0.13476 
Please give me some help or advice.

thanks very much.

0 votes
493 views

edit – please disregard. I checked the SciTraderView demo source code and found that it is required to recalculate data manually

0 votes
0 answers
558 views

Using scichart in wpf, set AcceptsUnsortedData = true, there is a dashed line indicating the direction of the data, I want to know, how to hide it, does affect the normal display of the chart.

0 votes
619 views

Hi,
I am trying to create a new FastUniformHeatMap at runtime and bind it to a dataset, everything needs to be done in the code behind and I am not using MVVM.
I can create the HeatMap in the code behind with:

        SciChartSurface g2d = new SciChartSurface();
        FastUniformHeatmapRenderableSeries fuhrs = new FastUniformHeatmapRenderableSeries();
        HeatmapColorPalette hcp = new HeatmapColorPalette();
        NumericAxis xaxis = new NumericAxis();
        NumericAxis yaxis = new NumericAxis();
        g2d.RenderableSeries = new ObservableCollection<IRenderableSeries>() { fuhrs };
        g2d.XAxis = xaxis;
        g2d.YAxis = yaxis;

I can set the DataSeries with:

       g2d.RenderableSeries[0].DataSeries = myDataSeries;

(Where myDataSeries is a property returning a UniformHeatMapDataSeries object)

and I get my image, however, it is not bound to the property and if myDataSeries changes the image will not change.

How do I bind the DataSeries instead of just setting it, in this case?

I can make it work easily from the Xaml:

< sciChart:FastUniformHeatmapRenderableSeries DataSeries=”{Binding Path=myDataSeries, Mode=OneWay}” />

but I cannot figure out how to do it from the code behind.

0 votes
685 views

Hi,

according to your Limitations and Terms:

When your subscription expires unfortunately we have to remove your access. You can still get a zip of the latest version you are entitled to even after support expiry.

My licence is already expired. But how exactly I can get the repository zip?

Mi Licence and GitHub account is submited.

  • Daniel asked 6 months ago
  • last active 6 months ago
0 votes
751 views

Hi, I would like to know if it is possible to do half-pie (as in the photo) with SciChartDonutSurface and if so how? Thanks!

  • mike laor asked 6 months ago
  • last active 6 months ago
Showing 1 - 50 of 3k results