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

0 votes
23 views

Hi,

I have a simple digit chart with four possible values (0, 1, 2, 4).
I want to show all values on Y axis label, but it only shows 0 and 2, is there any solution?

Actual standing

0 votes
26 views

I recently needed to change the Rotation Angle of a polar plot from the default to 90 degrees. We have line annotations for different points on the polar plot. After the change, the annotation was still plotted on the default Rotation Angle.

I manually updated the points like this for the annotations to work:

var line = new LineAnnotation();

                var x1 = (double)NewSeries.DataSeries.XValues[0];
                var x2 = (double)NewSeries.DataSeries.XValues[1];

                if (x1.Between(0, 90) && x2.Between(0, 90))
                {
                    x1 += 270;
                    x2 += 270;
                }
                else
                {
                    x1 -= 90;
                    x2 -= 90;
                }

                line.X1 = x1;
                line.X2 = x2;

Is there another way to update the annotation or is something like this the preferred way?

0 votes
33 views

Dear scichart support.

I’d like to make the two map (Heat map and bubble chart) mixed like attached picture.

Is it possible?

and also I’d like to confirm that it is possible to bind heatmap with observableCollection.

0 votes
0 answers
30 views

When putting a chart into a listbox, the listbox doesn’t detect if the chart is clicked.

How can i change this, or there is any workarround to it? because i need it to select the parent ListBoxItem.

The problem is that when you put an event listener on the chart it doesn’t know where it is in the list, and when you put it in the listbox it doesn’t see it at all.

Thanks.

PS: I attached an example project where this happens.

0 votes
35 views

hello, i use RolloverModifier on my chart, can i hide Pointmarker?

0 votes
0 answers
34 views

Hi,
I am using VerticalLineAnnotation to point to a specific value of XAxis. I want to move this annotation by binding this X1 property and the SelectedX property of ViewModel. But even if SelectedX property was changed, the location of this annotation was not changed immediately. It was changed only after operating the chart (Zooming, etc).
Please let me know any solution to move an annotation immediately.

Thanks,
Yo Kobayashi

0 votes
35 views

Hi,,
I am using RubberBandXyZoomModifier modifier to zoom the rectangular area of plot. It works fine when rectangle area is within the bound area of plot. But when rectangle area is goes out side the surface , zoom doesn’t happen
Please let me know any solution to zoom in this scenario.

Thanks
Deepak

  • deepak b asked 2 weeks ago
  • last active 1 week ago
0 votes
38 views

Hi!

I have a chart that display time-series data and sometimes I have a few minutes of data, other times I have hours. All of the data points are taken every minutes. The X-Axis starts at 0 minutes and progresses from there.

My goal is to have the Axis Title say “Minutes” if there are < 120 points of data. If there are > 120 points of data then I want the Axis to be titled “Hours” and then divide the X-Axis label by 60.

I’ve started with this: https://www.scichart.com/documentation/v5.x/webframe.html#Axis%20Labels%20-%20LabelProvider%20API.html

and it’s doing about what I expect. I check the AxisCore’s Range and if the range is > 120 I set the AxisCore.AxisTitle to “Hours”, otherwise “Minutes”. So far so good.

The problem is that doing it this way means I have labels such as “48.333333” for the hours.

If, on the other hand, when I create the XYSeries that I’m plotting I pass in the already-divided-by-60 values, SciChart seems to select whole numbers so instead of showing me something like “48.333333” it would either show me “48” or it would use 50 or another whole number for the tick marks.

So my question: Is this doable by just writing a custom LabelProvider? Do I need to write a custom Axis class instead? Or somehow tell the Axis that’s in-use to recalibrate itself by dividing all of the elements by 60 before computing tick marks?

In the images I’m attaching, one plot shows me plotting a series where when I create series the x-value is being divided by 60 before I call .Append() on the series. The other one shows what happens when I use my custom LabelProvider and divide by 60 when the Axis label is drawn.

Thanks!

-David

0 votes
46 views

I’m trying to control the size of the bubbles that are being plotted in the FastBubbleRenderableSeries.

I’ve tried all these things, but I can’t seem to figure it out:

  1. Changing values that are plotted: there seems to be some “normalization” that occurs behind-the-scenes, so whether I scale the raw values, the bubble size is identical.
  2. Changing ZScaleFactor: Regardless of what value I use for ZScaleFactor, the bubble size is still the same.

I’ve attached the problem I’m facing, would appreciate your help.

Thanks.

0 votes
43 views

Hello,

I have the problem, that sometimes only one label is shown on the X-Axis even when there is space to show some more, than only one.
The property “IsLabelCullingEnabled” would show them all, but than it is ugly if there is not enough space.
So what can I do to have some more Labels shown?

In the Screenshots you can see that with only a few pixels more, more labels are shown, but the could have been also shown with less pixels (Especially Label “1” and “22” could have been shown).

0 votes
44 views

I’m working on a project that updates about 100,000 pointers in real time, but it takes too much time to change the individual colors of the pointers.
Is there any quick way to change pointer individual color?

0 votes
80 views

To whom this may concern:

I would like to create a custom data series where I can manipulate the X-Values more efficiently for a ColumnRenderableSeries, where if I remove a column from the chart or there is a gap in the data, I won’t have any spaces between any of the columns in the chart. I also haven’t found any documentation on creating a custom data series.

My approach is to treat the X values like a stack.
– If a point is appended, a value is pushed to the X values stack and the Y values list.
– If a point is to be removed using RemoveAt(), it only removes the Y-Axis value from the index and pops the X values stack so the order and spacing of the x-values remain the same.

This is similar to Microsoft Excel, where removing a data row linked to a chart deletes the X-axis value instead of leaving a gap.

My thinking is making the following derivation of XYDataSeries (in C# pseudocode):

ColumnDataSeries<TY> : XyDataSeries<int, TY> where TY : IComparable
{
    Stack<IComparable> XValues { get; set; }
    IList<IComparable> YValues { get; set; }

    Append (T value) 
    {
        XValues.Push (XMax + 1);
        YValues.Add (value);
    }

    RemoveAt (int index) 
    {
        XValues.Pop ();
        YValues.RemoveAt (index);
    }
}

Can you please advise or provide any documentation for this?

Thank you, and best regards!

— Ari

Edit: Sorry if the code doesn’t look right, I don’t know how to properly wrap C# code on the forums.
Edit 2: Second attempt at posting code. Should see the generics now.

  • Ari Sagiv asked 2 weeks ago
  • last active 4 days ago
0 votes
0 answers
50 views

Hello,

I have created some ChartModifiers in a ModifierGroup in my ViewModel class (using Caliburn.Micro as MVVM framework, not code behind) and bound the group to my SciChartSurface in xaml. Now I want to apply some styles to my modfiers in xaml. Just creating styles with the specific target types don’t work so how do I do this?

  • Roland D asked 3 weeks ago
  • last active 3 weeks ago
0 votes
59 views

Hello

I have 2 charts, a 2D Heatmap and a 3D Waterfall chart, and I want to be able to programmatically change their color palettes.

The 2D heatmap is set up like this, with the GradientStops bound to an ObservableCollection:

...
<s:HeatmapColorPalette x:Key="HeatmapColorPalette" Maximum="{Binding MaxValue,Mode=TwoWay}"  GradientStops="{Binding ColorPalette}"/>
...
<s:SciChartSurface.RenderableSeries>
    <s:FastUniformHeatmapRenderableSeries 
        x:Name="heatmapSeries" 
        DataSeries="{Binding Data}"
        ColorMap="{StaticResource HeatmapColorPalette}">
    </s:FastUniformHeatmapRenderableSeries>
 </s:SciChartSurface.RenderableSeries>
...

This works as expected. When the binding changes the palette/heatmap changes.

The 3D waterfall is set up the similarly:

...
<s3D:GradientColorPalette x:Key="GradientColorPalette" IsStepped="False"  GradientStops="{Binding ColorPalette}" />
...
<s3D:SciChart3DSurface.RenderableSeries>
    <s3D:WaterfallRenderableSeries3D
        x:Name="waterfallSeries"
        DataSeries="{Binding Data3D}"
        YColorMapping="{StaticResource GradientColorPalette}"
        SliceThickness="1">
    </s3D:WaterfallRenderableSeries3D>
</s3D:SciChart3DSurface.RenderableSeries>
...

This, when passed the same data, doesn’t render the chart.
This chart otherwise works fine if I define the GradientStops statically in the XAML.

This is the GradientStops definition (in f#):

let BlueRed = 
        new ObservableCollection<GradientStop>([
            new GradientStop(Color.FromRgb(0x00uy,0x00uy,0xFFuy),0.0)
            new GradientStop(Color.FromRgb(0xFFuy,0x00uy,0x00uy),1.0)
        ])

I am not sure what I am missing.

(edit: apologies for formatting issues in the question)

0 votes
54 views

I just switched from using the CategoryDatetimeAxis to the DatetimeAxis. I need to use the DatetimeAxis because i first fetch datetime data that has an interval on a minute basis. After that the data will be in a one second interval. The CategoryDatetimeAxis results in a equidistant behaviour which does not reflect the usecase in this scenario. The distance of the values must be relative to their difference in time. That is why the DatetimeAxis fits my need.

However, the DatetimeAxis interpolates between two dates when there is no data available. Is there a way to disable this behaviour, such that no line is drawn between two dates, but just a gap. I have tried to use the DrawNaNAs = LineDrawMode.Gaps, but this only works on nan data. Which is not precisely the case.

I have attached a picture which reflects my point. The red circled area is what i don’t want to show. Ideally the two dates would just squash next to each other.

0 votes
0 answers
41 views
.

.

0 votes
69 views

Hi,

I’m looking for the old version 3.1.0.5122. Where can I find it?

Best regards

  • miri asked 3 weeks ago
  • last active 4 days ago
0 votes
63 views

Dear support,

What is the best way to anchor a GroupBox to the top right corner of a SciChartSurface (as shown in the attached screenshot)? At the moment, I am using an absolute positioning that often fails at initialization or when the surface is resized. I am looking into the annotation API, but have not yet found a clean solution.

Thank you,
Lucas

0 votes
60 views

I am attempting to transfer a license from another developer to myself. That developer has deactivated the license using the licensing wizard yesterday, and his account shows the license as deactivated, but when I attempt to activated the license errors occur

Serial key ************************** has already been activated by UserName=catesax, ‘Andrew Cates’,

0 votes
53 views

I am using Abt.Controls.SciChart.Wpf dll(Version ) in our project and got an error ‘Object reference not set to an instance of an object’ when i do mousewheel scroll over symbol drop down and move the mouse over the scichart surface while scrolling and the error stack trace is

at Abt.Controls.SciChart.ChartModifiers.MouseWheelZoomModifier.OnModifierMouseWheel(ModifierMouseArgs e)
at Abt.Controls.SciChart.ChartModifiers.ModifierGroup.SB(Action2 C, ModifierEventArgsBase D)
at Abt.Controls.SciChart.Common.Extensions.EnumerableExtensions.[](IEnumerable
1 , Action`1 )
at Abt.Controls.SciChart.Utility.Mouse.MouseManager..(Object , MouseWheelEventArgs )
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at TradingSystemApp.Program.Main() in

0 votes
71 views

I have a fairly simple multiple series line chart, which shows the history of a couple of variables within the last 5, 15, or 30 minutes.

The x axis is always ranged between Now – X mins and Now + 10 secs (to allow for clock error).

I’d like to have the x axis constantly scrolling, smoothly. I’ve not been able to achieve this using a timer. I’ve tried to use AnimatedVisibleRange, triggered from a 500ms timer, but there’s quite visible jerking.

I should add that the data comes in sporadically, but the chart should still scroll without any new data.

What am I missing? Thanks

0 votes
61 views

I have created a CustomControl that have scichart surface which draws a FastLineRenderableSeries and some other controls like buttons etc for controlling how data is displayed.
I have some dependecy properties like
– VisibleRange
– Horizontal and vertical Anotations values
as well as the XyDataSeries<double,double>

When I use the control in a window I can data bind to a viewmodel and VisibleRange and the annotations are fine but not the update of the XyDataSeries.

Any ideas?

0 votes
72 views

Hi All,

I am new to SciChart world and need little assistance. I have to export scichart to image(format not matter right now). I am using WPF with MVVM. I have created a scichartsurface object in my viewmodel and now tryng to assign different properties that are bind to my actual scichartsurface in View. I am facing type casting error while assigning annotation preperty.

Here’s I define Annotation bind to actual graph in view

     public BindableCollection<TextAnnotationViewModel> GraphAnnotations;

here’s the code for where I am getting type mismatch error

    private void ChartToImage()
    {
        var chart = new SciChartSurface()
        {
            RenderableSeries = new RenderableSeriesSourceCollection(LineRenderSeries)
            Annotations = GraphAnnotations,
        };
    }

Here’s my View code

    <s:SciChartSurface
        Name="sciChart"
        Annotations="{s:AnnotationsBinding GraphAnnotations}"
        RenderableSeries="{s:SeriesBinding LineRenderSeries}">

It would be great if you also give example and details for X,Y Axis casting for my above ChartToImage method.

0 votes
83 views

Hi team,

How to access, enable and disable scrollbar in c# wpf?

My declaration is as of below.

            <sc:SciChartScrollbar Axis="{Binding ElementName=SciChart, Path=XAxis}" Height="18" Width="150" />

Thanks in advance.

  • Adrian Loh asked 1 month ago
  • last active 4 weeks ago
0 votes
85 views

Hi Team,

I added the PinchZoomModifier to my chart. However, when we do the gesture it does not zoom, instead, it pans the y-axis.
Here is the code:

<s:SciChartSurface s:ThemeManager.Theme="BrightSpark">
            <s:SciChartSurface.ChartModifier>
                <s:ModifierGroup>
                    <s:VerticalSliceModifier ShowTooltipOn="Never">
                        <s:VerticalSliceModifier.VerticalLines>
                            <s:VerticalLineAnnotation Style="{StaticResource SliceStyle}" X1="{Binding SelectedStartDate, Mode=TwoWay}" IsEditable="True"/>
                            <s:VerticalLineAnnotation Style="{StaticResource SliceStyle}" X1="{Binding SelectedEndDate, Mode=TwoWay}" IsEditable="True"/>
                        </s:VerticalSliceModifier.VerticalLines>
                    </s:VerticalSliceModifier>
                    <s:RubberBandXyZoomModifier ExecuteOn="MouseLeftButton"
                                                RubberBandFill="#AA34aeeb" RubberBandStroke="#AAFFFFFF"
                                                RubberBandStrokeDashArray="2 2"/>
                    <s:PinchZoomModifier XyDirection="XDirection"/>
                    <s:MouseWheelZoomModifier XyDirection="XDirection"/>
                    <s:ZoomExtentsModifier ExecuteOn="MouseDoubleClick" />
                    <s:YAxisDragModifier DragMode="Pan"/>
                    <s:XAxisDragModifier DragMode="Pan" ClipModeX="None"/>
                </s:ModifierGroup>
            </s:SciChartSurface.ChartModifier>
            <s:SciChartSurface.XAxis>
                <s:DateTimeAxis AxisTitle="Time" VisibleRange="{Binding XVisibleRange, Mode=TwoWay}"
                                TextFormatting="dd-MMM-yyyy" SubDayTextFormatting="HH:mm:ss" DrawMinorTicks="True" />
            </s:SciChartSurface.XAxis>
            <s:SciChartSurface.YAxis>
                <s:NumericAxis AxisTitle="Distance" VisibleRange="{Binding YVisibleRange, Mode=TwoWay}"/>
            </s:SciChartSurface.YAxis>
            <s:SciChartSurface.RenderableSeries>
                <s:XyScatterRenderableSeries DataSeries="{Binding Chirps}" >
                    <s:XyScatterRenderableSeries.PointMarker>
                        <s:EllipsePointMarker Width="9" Height="9" Fill="SteelBlue" Stroke="LightSteelBlue" StrokeThickness="2"/>
                    </s:XyScatterRenderableSeries.PointMarker>
                </s:XyScatterRenderableSeries>
            </s:SciChartSurface.RenderableSeries>
        </s:SciChartSurface>

Can you please help me to know what’s wrong here?

0 votes
125 views

Hello

I’m using RealTimeHeatmap, my vertion is v5.3.0.11954

I fond that when my data with maximum value below 20 (including) ,it works well;

however when my data with maximum value above 20,like 21 ,it dosen’t work. no warnings nor errors ,no map shows nor actions,just makes my program dead

I have read the example in Examples Suit, the values are OK in example, I dont know where the wrong is.

data with maximum value below 20

map shows,and works well

data with maximum value above 20,like 21

0 votes
100 views

Hello!

I am trying to programmatically set a range for HeatmapColorPalette and attached HeatmapColorMap to min and max of my data.

Binding HeatmapColorPalette.Maximum to a property in my View Model works well. However, when I add HeatmapColorMap everything breaks, the heat map no longer responds to changes in View Model.

What am I doing wrong?

Here is my View:

<Window x:Class="SciChartHeatMap.MainWindow"
    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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="clr-namespace:SciChartHeatMap"
    xmlns:s="http://schemas.abtsoftware.co.uk/scichart"
    d:DataContext="{d:DesignInstance Type=local:HeatMapViewModel, IsDesignTimeCreatable=True}"
    mc:Ignorable="d"
    Title="MainWindow" Height="450" Width="800">
<Grid>
    <Grid.Resources>
        <s:GradientStopsToLinearGradientBrushConverter x:Key="ColorsToLinearGradientBrushConverter"/>
    </Grid.Resources>
    <Grid.ColumnDefinitions>
        <ColumnDefinition/>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition Width="Auto"/>
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition/>
    </Grid.RowDefinitions>
    <s:SciChartSurface Grid.Row="0" Grid.RowSpan="2">
        <s:SciChartSurface.RenderableSeries>
        <s:FastUniformHeatmapRenderableSeries x:Name="HeatMapSeries" DataSeries="{Binding Data}" Opacity="0.9">
            <s:FastUniformHeatmapRenderableSeries.ColorMap>
                <s:HeatmapColorPalette Maximum="{Binding ColorMaximum}">
                    <s:HeatmapColorPalette.GradientStops>
                        <GradientStop Offset="0" Color="DarkBlue"/>
                        <GradientStop Offset="0.2" Color="CornflowerBlue"/>
                        <GradientStop Offset="0.4" Color="DarkGreen"/>
                        <GradientStop Offset="0.6" Color="Chartreuse"/>
                        <GradientStop Offset="0.8" Color="Yellow"/>
                        <GradientStop Offset="1" Color="Red"/>
                    </s:HeatmapColorPalette.GradientStops>
                </s:HeatmapColorPalette>
            </s:FastUniformHeatmapRenderableSeries.ColorMap>
        </s:FastUniformHeatmapRenderableSeries>
        </s:SciChartSurface.RenderableSeries>
        <s:SciChartSurface.XAxis>
            <s:NumericAxis 
                FlipCoordinates="False" 
                ScientificNotation="None" 
                AutoTicks="False"
                MajorDelta="1"
                MinorDelta="0.5"
                AxisAlignment="Top"/>
        </s:SciChartSurface.XAxis>
        <s:SciChartSurface.YAxis>
            <s:NumericAxis 
                FlipCoordinates="True" 
                ScientificNotation="None"
                AxisAlignment="Left"/>
        </s:SciChartSurface.YAxis>
    </s:SciChartSurface>

    <!-- Enabling this will break the program
    <s:HeatmapColorMap
        Grid.Column="1"
        Grid.Row="0"
        Grid.RowSpan="2"
        Margin="5,0,5,0"
        HorizontalAlignment="Right"
        VerticalAlignment="Stretch"
        DataContext="{Binding Source={x:Reference Name=HeatMapSeries}, Mode=OneWay}"
        ColorMap="{Binding ColorMap.GradientStops, Converter={StaticResource ColorsToLinearGradientBrushConverter}}"
        Maximum="{Binding ColorMap.Maximum}"
        Orientation="Vertical">
    </s:HeatmapColorMap>
    -->

    <Label 
        Grid.Row="0" 
        Grid.Column="2" 
        Content="{Binding ColorMaximum}" 
        Width="50" 
        HorizontalContentAlignment="Center"/>
    <Slider 
        Grid.Column="2" 
        Grid.Row="1" 
        Orientation="Vertical" 
        Minimum="0" 
        Maximum="10" 
        HorizontalAlignment="Center"
        Value="{Binding ColorMaximum}"/>
</Grid>

The idea in this small example is for slider to control both HeatmapColorPalette.Maximum and s:HeatmapColorMap.Maximum

The code in my View Model is pretty simple:

private double mColorMax;

public double ColorMaximum
    {
        get => mColorMax;

        set
        {
            mColorMax = value;
            OnPropertyChanged();
        }
    }

My View Model implements INotifyPropertyChanged

I will appreciate any suggestions.

Thank you in advance!

0 votes
78 views

Hello,

I had previously commented on an existing issue, but wanted to bump here since it’s impeding development.

When adding a DataPointSelectionModifier to a chart surface containing a FastUniformHeatmapRenderableSeries with a UniformHeatmapDataSeries, an exception is thrown on a mouse drag.

The modifier is added simply with:

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

After adding this modifier and using my mouse to select a part of the heatmap, I get the following System.InvalidOperationException (stack trace below):

"Metadata for his type cannot be returned as an one-dimentional array. Please use the IPointMetadata[,] Metadata property"

I’m assuming this is happening because DataPointSelectionModifier was by default not meant for data series with 2D arrays, but I’m not sure how to follow the exception message “Please use the IPointMetadata[,] Metadata property”.

Ultimately I am trying to run a calculation on the selected subset of the heatmap. Any help would be appreciated and thanks in advance!

Stack trace:

  at SciChart.Charting.Model.DataSeries.Heatmap2DArrayDataSeries.BaseHeatmapDataSeries`3.SciChart.Charting.Model.DataSeries.IDataSeries.get_Metadata()
   at SciChart.Charting.ChartModifiers.DataPointSelectionModifier.UpdateState()
   at SciChart.Charting.ChartModifiers.DataPointSelectionModifier.KUB()
   at A.MEB.D[D](D D, Boolean I, Func`1 J)
   at SciChart.Charting.ChartModifiers.DataPointSelectionModifier.get_SelectedPointMarkers()
   at SciChart.Charting.ChartModifiers.DataPointSelectionModifier.DeselectAllPointMarkers()
   at SciChart.Charting.ChartModifiers.DataPointSelectionModifier.SelectManyPoints(Point startPoint, Point endPoint, SelectionMode selectionMode)
   at SciChart.Charting.ChartModifiers.DataPointSelectionModifier.OnModifierMouseUp(ModifierMouseArgs e)
   at SciChart.Charting.ChartModifiers.ModifierGroup.FTB(Action`2 D, ModifierEventArgsBase I)
   at SciChart.Core.Extensions.EnumerableExtensions.ForEachDo[T](IEnumerable`1 enumerable, Action`1 operation)
   at SciChart.Core.Utility.Mouse.MouseManager.GB(IPublishMouseEvents D, IReceiveMouseEvents I, MouseEventArgs J, MouseButtons M, Action`3 O)
   at SciChart.Core.Utility.Mouse.MouseManager.AEB.S(Object D, MouseButtonEventArgs I)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at Main.main(String[] _arg1) in ...\App.fs:line 13
  • jsacks asked 1 month ago
  • last active 1 month ago
0 votes
101 views

Thank you for your support.

This time, I’d like to know
– how to get the position data on cursor in the heatmap.
– how to draw or remove the horizontal and vertical line on cursor point in the heatmap.

Thank you.

0 votes
79 views

Via MVVM I’m binding an ObservableCollection to my chart. I’m trying to support both a rollover modifier and a tooltip modifier based on a user selection (checkboxes). On the backend I only apply the StyleKey to “TooltipStyle” when one of these checkboxes are selected. I can verify that my model is being updated correctly and that I am able to assign the “StyleKey” to each series in my collection when these values change. However the “tooltips” are never displayed. The rollover works as expected, and I see the tooltip for it, but I can never get the tooltip to display when rollover is unchecked. See anything wrong?

<!-- Modifiers (zoom, panning, tooltips, cursor) -->
        <s:SciChartSurface.ChartModifier>
            <s:ModifierGroup>
                <s:RubberBandXyZoomModifier IsAnimated="True" IsXAxisOnly="False" />
                <s:ZoomExtentsModifier ExecuteOn="MouseDoubleClick" />
                <s:ZoomPanModifier ExecuteOn="MouseRightButton" />
                <s:MouseWheelZoomModifier ActionType="Zoom" XyDirection="XYDirection" />
                <s:XAxisDragModifier DragMode="Scale" />
                <s:YAxisDragModifier DragMode="Scale" />
                <s:TooltipModifier x:Name="ChartTooltip" IsEnabled="{Binding Path=ShowTooltips}" />
                <s:RolloverModifier IsEnabled="{Binding Path=SnapToPoints}" />
                <s:CursorModifier x:Name="ChartCursor" IsEnabled="False" ShowAxisLabels="True" Foreground="Red" />
            </s:ModifierGroup>
        </s:SciChartSurface.ChartModifier>

My styles are defined below. When I want to see either the tooltips or the rollover I assign the StyleKey to “TooltipStyle” and when neither of them is selected I assign the StyleKey to “NoTooltipStyle”.

            <!-- Template for regular tooltips -->
        <DataTemplate x:Key="TooltipDataTemplate" DataType="{x:Type s:XySeriesInfo}">
            <StackPanel Orientation="Vertical">
                <TextBlock Foreground="White">
                        <Run Text="Distance: " />
                        <Run Text="{Binding FormattedXValue, Mode=OneTime}" />
                        <Run Text=" cm" />
                </TextBlock>
                <TextBlock Foreground="White">
                        <Run Text="Relative dose: " />
                        <Run Text="{Binding FormattedYValue, Mode=OneTime}" />
                    <Run Text=" %" />
                </TextBlock>
            </StackPanel>
        </DataTemplate>

        <!-- Hover template for snap -->
        <DataTemplate x:Key="SnapDataTemplate" DataType="{x:Type s:XySeriesInfo}">
            <StackPanel Orientation="Vertical">
                <TextBlock Foreground="White">
                        <Run Text="Distance: " />
                        <Run Text="{Binding FormattedXValue, Mode=OneTime}" />
                        <Run Text=" cm" />
                </TextBlock>
                <TextBlock Foreground="White">
                        <Run Text="Relative dose: " />
                        <Run Text="{Binding FormattedYValue, Mode=OneTime}" />
                    <Run Text=" %" />
                </TextBlock>
            </StackPanel>
        </DataTemplate>

        <!-- Standard series with snap tooltip and regular tooltip -->
        <Style TargetType="{x:Type s:FastLineRenderableSeries}" x:Key="TooltipStyle">
            <Setter Property="s:TooltipModifier.TooltipTemplate" Value="{StaticResource TooltipDataTemplate}" />
            <Setter Property="s:SeriesValueModifier.IncludeSeries" Value="False" />
            <Setter Property="s:RolloverModifier.TooltipTemplate" Value="{StaticResource SnapDataTemplate}" />
        </Style>

        <!-- Standard series with no tooltip -->
        <Style TargetType="{x:Type s:FastLineRenderableSeries}" x:Key="NoTooltipStyle">
            <Setter Property="s:TooltipModifier.IncludeSeries" Value="False" />
            <Setter Property="s:SeriesValueModifier.IncludeSeries" Value="False" />
            <Setter Property="s:RolloverModifier.IncludeSeries" Value="False" /> 
        </Style>
0 votes
88 views

Dear SciChart Team:

My application is a time chart, the X axis is TimeSpan, the Y axis is a value, I want to append points with a fixed X axis length, but my current practice is to fix the number of points.

For example:
TimeSpan is fixed at ten seconds. After points is appended, if TimeSpan exceeds ten seconds, the first point is deleted, and the latest point are retained.

  • Johnny Yeh asked 1 month ago
  • last active 1 month ago
0 votes
87 views

Dear SciChart Team:

An exception occurs when I drag the X-axis to change the scale via the XAxisDragModifier (as shown in the attached image).
This happens when the X-axis scale is dragged out of view.
Is there any reason for this exception to occur? How can I rule out?

  • Johnny Yeh asked 1 month ago
  • last active 1 month ago
0 votes
85 views

Dear SciChart Team:

I want to extend the chart to fit the size to match DataRange and have two operational scenarios:
1. Call SciChartSurface.ZoomExtents()
2. Double click on the canvas with ZoomExtentsModifier

When I change the Y-axis(X-axis) scale through the YAxisDragModifier(XAxisDragModifier) and append points to the curve, and then execute ZoomExtents(), the chart does not match the DataRange.

How do I zoom extents the chart to match DataRange?

  • Johnny Yeh asked 1 month ago
  • last active 1 month ago
0 votes
78 views

I am not able to find the data point corresponding to current mouse position on heatmap series PreviewMouseMove event.

Here is my code,

private void Contour_PreviewMouseMove(object sender, MouseEventArgs e)
    {
        var xCalc = Contour.RenderableSeries[0].XAxis.GetCurrentCoordinateCalculator();
        var yCalc = Contour.RenderableSeries[0].YAxis.GetCurrentCoordinateCalculator();
        Point mousePoint = e.GetPosition(((SciChartSurface)sender).ModifierSurface as UIElement);
        double peakXCordInfoValue = xCalc.GetDataValue(mousePoint.X);
        double peakYCordInfoValue = yCalc.GetDataValue(mousePoint.Y);
    }

“Contour” is my SciChart object. When I debugged to find out my X and Y axis data points and compared them with what I find above in peakXCordInfoValue, then they don’t match. Ideally if I am finding the data point then it should match exactly.

I also tried to find index

var index = Contour.RenderableSeries[0].DataSeries.FindIndex(yDataForCoordinate, SearchMode.Nearest);

But it gives error “Operation is not valid due to the current state of the object.”
I also tried cursormodifier and its OnModifierMouseMove event, but it gives same error.

For Example: The actual data point on Y axis is 280.774501562118, and the above code returns 280.523009343212

  • Anil Soman asked 1 month ago
  • last active 1 month ago
0 votes
90 views

Hi SciChart!

I am evaluating the trial for possible use in a major project within our organisation.

We have decided to use the System.Reactive reactive extensions as our event handler and I have reached the point where I have an IObservableCollection (instantiated as ObservableCollectionExtended) of where T can be any type containing X and Y values.

My question is, is it possible to Bind a scichart Line Series on to such a collection in order to update via the reactivestream updates?

I’d rather not have to copy points into yet another collection type if possible.

Note: I looked at the nuget for scichart wpf reactive library and that seems to bind on to rx 2.2.5 whereas I’m using system.reactive 4.1.6

Any direction for a new-to-reactive developer would be greatly received.

Greg

0 votes
101 views

Hello Team,

I am evaluating Sci Chart for using in our production applications. I am creating a POC for the same if it fits our requirements.

I have created a scattered chart successfully. Our next requirement is to select a part of the chart, basically, like data from this date to this date. I was trying to explore VerticalSlice Modifier for it. My purpose was that the user will place the sliders on the start date and end date and we will get those values. Can you tell me if this approach is correct or suggest a different technique, annotation or marker, any other modifier to select data between two dates?

<Grid Grid.Row="1">
        <s:SciChartSurface s:ThemeManager.Theme="BrightSpark">
            <s:SciChartSurface.ChartModifier>
                <s:ModifierGroup>
                    <s:VerticalSliceModifier Name="sliceModifier">
                        <s:VerticalSliceModifier.VerticalLines>
                            <s:VerticalLineAnnotation X1="{Binding SelectedStartDate, Mode=TwoWay}" IsEditable="True"/>
                            <s:VerticalLineAnnotation X1="{Binding SelectedEndDate, Mode=TwoWay}" IsEditable="True"/>
                        </s:VerticalSliceModifier.VerticalLines>
                    </s:VerticalSliceModifier>
                </s:ModifierGroup>
            </s:SciChartSurface.ChartModifier>
            <s:SciChartSurface.XAxis>
                <s:DateTimeAxis AxisTitle="Number of Samples (per Series)"/>
            </s:SciChartSurface.XAxis>
            <s:SciChartSurface.YAxis>
                <s:NumericAxis AxisTitle="Value"/>
            </s:SciChartSurface.YAxis>
            <s:SciChartSurface.RenderableSeries>
                <s:XyScatterRenderableSeries x:Name="scatterSeries" Stroke="OrangeRed" DataSeries="{Binding Chirps}">
                    <s:XyScatterRenderableSeries.PointMarker>
                        <s:EllipsePointMarker Width="9" Height="9" Fill="SteelBlue" Stroke="LightSteelBlue" StrokeThickness="2"/>
                    </s:XyScatterRenderableSeries.PointMarker>
                </s:XyScatterRenderableSeries>
            </s:SciChartSurface.RenderableSeries>
        </s:SciChartSurface>
    </Grid>

Thanks for the help and support

0 votes
106 views

Hi,

I tried submitting a priority support ticket but I always get a 500 error after submitting.

I have an issue with a realtime graph tick label. The “zero” label sometimes changes to a strange value (-5.5511E-17) for no reason.

This only happens when the graph is running in a 32bit process, I can’t replicate it when running at 64bit.

Some info:

No operations on the labels in the code-behind

Data is stored in a XyDataSeries<double,double>


The issue is visible in the video and the image called “G5”. Image “Hashes” shows the alternative text formatting option of “#.#####” which doesn’t show a “0” value at all.
I can write a workaround, but I would like to know if this is a known issue or there is something wrong with my settings.

Video here: https://youtu.be/OGaAOVe9Yew

Thank you

0 votes
104 views

Hi,

I am using .NET 4.0 and SciChart v4.2.6.11205.

I have a viewmodel with the following property:
public AnnotationCollection Annotations { get; set; }

I have tried binding to the Annotations property from my view with the following code but without success:
Annotations=”{Binding Annotations}”
Annotations=”{Binding Path=Annotations}”

How to I bind to an AnnotationsCollection with SciChart 4.0?

Do you have an example you can send me.

Regards,
peter.crowley@snapon.com

0 votes
0 answers
92 views

Hello,

I’m trying to drag several VerticalLineAnnotationViewModel simultaneously. So if I drag one all other should move the same delta.
I subscribed the “DragDelta”-Event for each VerticalLineAnnotationViewModel. My problem is that “AnnotationDragDeltaEventArgs” seems in pixel unit and I didn’t find a CoordinateCalculator for the NumericAxisViewModel. Is there any solution to convert the dragged delta to dataValue or axis coordinates so I could just add the delta to the X1 property of my VerticalLineAnnotationViewModels?

0 votes
110 views

Hello,

I am creating a LineAnnotation using Annotation Modifier.

In AnnotationCreated event, I need the Hit Test Info of the start and end Points of annotation i.e. annotation.X1,Y1,X2,Y2 points in order to find out the series name and other information(similar to HitTestAPI example in examples suit).

I also need to verify if they are lying on a series or not.

The problem here is series.HitTest() accepts a raw point which I am unable to get from annotation.

Is there any way to do this.

0 votes
164 views

Hi,

we have a graph which it’s x axis visible range changed when the graph draw until the max (as a travel graph)
we also have logic for each serie a minimum\maximum range, outside of this range the color should be red
so, we use the ExtremePointMarkerPaletteProvider and set for each value the suttible color in the colors list.

our problem is when the graph visible range changed – the serie points is draw correctly but it’s color is not match.
the colors are stay the same as they was before the range changed.
we looked at the colors list and YValues list – the value and the color on each index was match.
the problem is only in the view.

also, after some time it’s fixed, we don’t know what cause it to be fixed…

Thanks

0 votes
184 views

Hello,

I am adding a line annotation using annotation modifier, and it works perfectly fine.

But the problem is, I want to restrict the creation when the start and end points of annotation are not part of a line. I don’t care if they are not part of dataseries points, user can select any point on the line.

I am unable to find a way to verify this. Can you look into this.

0 votes
135 views

I want to made custom verticalLine extension which drag to series point. I use MVVM pattern. I made a custom VerticalLine from VerticalLineAnnotationViewModel. I set X1 value from model then the position of line chaning, then I drag the line with mouse. I get the earlier value of X1 in the DragSarted event, not that value which I set in model.
How can I gat correct value from DragStart?
I found similar problem in forum https://www.scichart.com/questions/wpf/problem-setting-a-vertical-line-annotation-position-in-mvvm

  • Zsolt Huse asked 2 months ago
  • last active 2 months ago
0 votes
134 views

I made wpf project with MVVM. I added LineRenderableSeriesViewModel to the model. SelectedSeriesStyle contains StrokeThickness=3 property. When I click on series, the SeriesSelectionModifier set correctly the line thicknes, but when I set IsSelected property in model, the seriesline thickness not changing. The stroke and PointMarkerTemplate properties work correctly.
Why not changing StrokeThickness property by model?

  • Zsolt Huse asked 2 months ago
  • last active 2 months ago
0 votes
141 views

Hi,

this is my scenario: I want to create a “band annotation”, a stretched box with some text.
I can use Text annotation but I want that annotation stretch in some directions.

In example, X1 = extreme left (as X1=0 in relative mode), X2 = Some X Axis Value, Y1 = Some Y Axis Value, Y2= Some Y Axis Value. This is a band without definite X1 value.

Or: X1 = Some axis value, Y1 = Some Axis Value, X2 = extreme right, Y2=Extreme Bottom, this is a rectangle that stretch to the bottom right corner.

At the end I must place a text in the center of box.

Can you help me?

Thank’s
marc.

0 votes
151 views

hello, i have question is how to draw minor label.
When i use logaxis and zoom to high precision, yaxis have only minor point.
it is not draw any label.

0 votes
150 views

I was looking at the example given at this link for NonUniformHeatmapDataSeries in SciChart. In this example, the width and height of heatmap is given as h=4 and w=7. As I understand h is for Y axis and w is for X axis and data[,] is for Z axis. However, the counts in actual data filled for these axis are not matching wight h and w.

var xRangeMapping = new int[] { 0, 10, 20, 26, 36, 60, 72, 84 };   // 8 points for w
var yRangeMapping = new int[] { 100, 250, 390, 410, 600 };         // 5 points for h

What is the purpose of extra points added at first place (0 and 100)? Are these required to set the starting point for both axis?

Here is the code given at above link:

int w = 7, h = 4;
var data = new double[h, w];
double maxValue = double.MinValue;
for (int x = 0; x < w; x++)
    for (int y = 0; y < h; y++)
    {
        data[y, x] = 3.5 * ((h - y) * (w - x));
        maxValue = Math.Max(maxValue, data[y,x]);
    }
var xRangeMapping = new int[] { 0, 10, 20, 26, 36, 60, 72, 84 };
var yRangeMapping = new int[] { 100, 250, 390, 410, 600 };
var heatmapDataSeries = NonUniformHeatmapDataSeries<int, int, double>(data, i => xRangeMapping[i], i => yRangeMapping[i]);

// Apply the Heatmap DataSeries to a FastNonUniformheatmapRenderableSeries
var heatmapRenderableSeries = new FastUniformHeatmapRenderableSeries()
 {      
     ColorMap = new HeatmapColorPalette()
    {
        Maximum = maxValue,
        Minimum = 0,
        GradientStops = // exercise left to the reader
    }
 };
  • Anil Soman asked 2 months ago
  • last active 2 months ago
0 votes
149 views

I am using a custom CursorModifier class in my WPF code. I have created a class inherited from CursorModifier for this purpose. Now I want to apply cross-hair cursor style to my chart. The style in XAML is not getting applied at all. However, when I use the CursorModifier directly (instead of custom modifier class) in XAML, then it applies.

If I changed the TargetType to “loca:MyCursorModifier”, then it gives error “The memeber StrokeThickness is not recognized” & “The “memeber Stroke is not recognized”.

<UserControl.Resources>
    <Style x:Key="CrossLineStyle" TargetType="Line">
        <Setter Property="StrokeThickness" Value="1" />
        <Setter Property="Stroke" Value="Black " />
    </Style>
</UserControl.Resources>

<local:MyCursorModifier ShowTooltip="False" ShowTooltipOn="Never" ShowAxisLabels="False" SourceMode="AllSeries" LineOverlayStyle="{StaticResource CursorLineStyle}"/>
  • Anil Soman asked 2 months ago
  • last active 2 months ago
0 votes
163 views

Hi there!

I am relatively new to C# and I am currently trying to plot a network dependency graph in my wpf application. This is something like a hierarchical edge bundling graph. https://vega.github.io/vega/examples/edge-bundling/

Are there any good plotting libraries out there that can help me achieve this? I have looked into Scichart and it does not seem to be able to do it.

0 votes
148 views

Is it possible to display the X Axis peak Value on SciChartRadarSurface?
I tried to use Text Annotation but I don’t know how to use it on SciChartRadarSurface
I tried also to use RadarAxisPanel but I did not find examples that explain how to use it and if I can insert Text annotations inside
Please help
Thank you

Showing 1 - 50 of 2k results