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

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

0 votes
0 answers
5 views

I created a custom control and created a theme for the visual of the SciChartSurface. The goal is to add/remove Y Axes as needed. The problem is only one Scrollbar is created for all the axes and as I add an axis the scroll bar gets bound to the latest axis.

But if I implement it as View/ViewModel and not a custom control, it works fine.

I’m evaluating SciChart for use in our product is this is my only issue with it. Any Ideas?

0 votes
22 views

Hi

When i try to upgrade my scichart library version 4.2.3.10190 to 5.1.1.11473
I got the following build error, how can i resolve it ?
Error CS1061 ‘ISciChartSurfaceBase’ does not contain a definition for ‘GridLinesPanel’ and no extension method ‘GridLinesPanel’ accepting a first argument of type ‘ISciChartSurfaceBase’ could be found (are you missing a using directive or an assembly reference?)

Regards
Abhilash R

0 votes
0 answers
15 views

Hi,

When I used scichart real-time graph for 3 days(no stop), It does not draw smoothly.

It looks broken… draw, wait for 1 second, draw, wait…..(repeat)

but first day, It worked well..

Why is it??

I use buffer size(1843200) and draw 80 fast lines.

and Memory in my PC is 16GB.

Please help me to solve this problem….

0 votes
32 views

Hi,
I use HitTest in the “OnModifierMouseDown(ModifierMouseArgs e)”in the MyCustomClass.
This Class inherits SeriesSelectionModifier.
The result of HitTest is shifted by the width of Y axis when the AxisAlignment of Y axis is Left.
So, the HitTestInfo of XValue or IsHit or anymore are not correct.
For Avoiding this ploblem, I need to write the following code before HitTest.
var point = new Point(e.MousePoint.X, e.MousePoint.Y);
if (base.YAxis.AxisAlignment == SciChart.Charting.Visuals.Axes.AxisAlignment.Left)
{
point.X = point.X – base.YAxis.Width;
}

Is this a specification or a bug?

Thanks.

0 votes
51 views

Hi I use Tenor Curves 3D Chart Example.
So, I tried get data position when I clicking the surface.

I found another example that Simple Select Scatter Point 3D Chart and I tried using XyzDataSeries3D.
But Appending data too slow. Cuz the data size is 2000 x 2000 (4M). So, I can’t use XyzDataSeries3D.

So I think how do I get the data? But I can’t find another answer.

Here’s my condition

1) Using UniformGridDataSeries3D
2) If I click the surface then I can get x, z position

0 votes
41 views

I have multiple chart panes and matching pane view models. I handle all synchronization in the view models rather than via share mouse group id or viewportmanager.

The chart modifiers are delared in xaml, but the Xaxis shared visual range of each pane is declared and shared via reference from the main main view model. When I use the mousewheel to zoom all panes are zoomed at the same time because of the shared visual range reference that all x-axes share. However when I use the RubberbandXyZoommodifier on one pane the other panes are not zoomed, however. I debugged and found that the shared reference of visual range is broken as soon as I use the RubberbandXyZoomModifier. Why is that? Is this a bug? Thanks

  • bbmat asked 3 weeks ago
  • last active 3 weeks ago
0 votes
45 views

Hi,

I have several chart panes that share a mouse group and a shared visual range (I inject the shared visual range of type IRange in the constructor of the pane view model). I then set the XAxis visual range to the shared visual range inside each pane view model. However, when I use either of the below approaches outside of the pane view model to adjust the min and max of shared visual range, the Xaxis.VisualRange of each pane does not reflect that change.

Approach A: _sharedVisualRange.Min = ….; _sharedVisualRange.Max = …
Approach B: _sharedVisualRange.SetMinMax(….)

Neither approach actually impacts the XAxis.VisualRange.Min/Max.

Initially when I created the XAxis in code I set its VisualRange equal to the shared visual range that was injected via constructor, like :

XAxis = new CategoryDateTimeAxis()
{
……
……
VisualRange = _sharedVisualRange,
…..
};

Please note that all the above refers to code in the view model. I bind the XAxis in the pane view model to the XAxis of the surface in xaml.

My entire synchronization heavily relies on the assumption of this working, but it does not.

  • bbmat asked 3 weeks ago
  • last active 3 weeks ago
0 votes
54 views

Hi,

I use your library. and I want to use directX.

but when I open a page using this(following your article),
[http://support.scichart.com/index.php?/Knowledgebase/Article/View/17261/0/high-quality-vs-high-speed-vs-directx-renderer-plugins]

I saw a error message and my program was terminated…

Error is,

Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: myprogram.exe
Problem Signature 02: 1.0.0.0
Problem Signature 03: 5b88a1cf
Problem Signature 04: SharpDX.D3DCompiler
Problem Signature 05: 4.0.1.0
Problem Signature 06: 592da5b5
Problem Signature 07: 2e
Problem Signature 08: c8
Problem Signature 09: System.DllNotFoundException
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 1033
Additional Information 1: 0d9f
Additional Information 2: 0d9f788f3d877e9bf9dd1ced0a063406
Additional Information 3: f3e4
Additional Information 4: f3e4c83f74a923e37478f9aa84b2c268

Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt

but I imported that in my project.

and Debug or Release folder has that dll.

This problem occured on another computer…(installed directX driver/ OS is Win7)

My development PC is fine.(Win10)

Why is it??

Please tell me awesome solution…

  • CholJin Ko asked 3 weeks ago
  • last active 3 weeks ago
0 votes
76 views

Hi All,

I’ve got a class that derives from the DataPointSelectionModifier in order to access the OnValueChanged() functionality and everything is fine (Thank you Andrew).

However – When I have 2 series on the chart (scatter series) and 2 points are quite close together, a single selection of a point can result in the selection of two points. On playing around with it a bit I notice that a point can be selected when the mouse pointer is slightly outside the limits of the pointmarker (in this case a 10×10 EllipsePointMarker) so if you get 2 points only a few pixels apart it is possible to place the mouse between the two and get both points selected. You can also see the behaviour in the SciChart examples 2DCharts|Toltips and Hit Test| Pointmarkers Selection example if you play with the points in the top left corner.

The Question: Is there a way to reduce the area around the mouse pointer that a hit test is detected in? (e.g. 20 pixel radius down to say 5 pixel radius)

I’ve had a look at overriding GeometryHitTestResult HitTestCore but I don’t really know if this is even the right way to go. If somebody can confirm this is where I should be looking then I’ll find some time to persevere with it.

Thanks in advance
/Stuart

0 votes
70 views

Hi! I have problems with visible range managing of a polar plot

The code in xaml:

<s:SciChartSurface graphModule:PlotLengthHelper.PlotLength="{Binding PlotLength, Mode=OneWayToSource,   UpdateSourceTrigger=PropertyChanged}" 
                       x:Name="ChartSurface"
                       SizeChanged="ChartSurface_OnSizeChanged"
                        ChartTitle="{Binding ChartTitle}"
                       s:ThemeManager.Theme="BrightSpark"
                        Annotations="{s:AnnotationsBinding Annotations}"
                       RenderableSeries="{s:SeriesBinding Series}"
                       XAxes="{s:AxesBinding XAxes}"
                       YAxes="{s:AxesBinding YAxes}"

First example. The code of the axis:

    var yAxis = new PolarYAxisViewModel {AutoRange = AutoRange.Never};
    YAxes.Add(yAxis);

Changing the VisibleRange of the axis has no any effect on the visible range of the graph. It sets automatically in the very first time and remains the same.

Second example.

    var yAxis = new PolarYAxisViewModel {AutoRange = AutoRange.Always};
    YAxes.Add(yAxis);

Changing the data (using line series) again has no any effect on the visible range of the graph. Again, it sets automatically in the very first time and remains the same.

Any suggestion on how to fix it? Especially the first case is required. Thanks.

0 votes
64 views

I add Animation in EllipsePointMarker, there is high cpu usage.
when i debug it,i found the code call “OnInvalidateParentSurface”.
There is a way to solve it?

DoubleAnimation opacityAnimation = new DoubleAnimation();
opacityAnimation.From = 0.4;
opacityAnimation.To = 0.1;
opacityAnimation.AutoReverse = true;
opacityAnimation.Duration = new Duration(TimeSpan.FromSeconds(1.5));
Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(EllipsePointMarker.OpacityProperty));
storyboard.Children.Add(opacityAnimation);

        DoubleAnimation widthAnimation = new DoubleAnimation();
        widthAnimation.From = 10;
        widthAnimation.To = 18;
        widthAnimation.AutoReverse = true;
        widthAnimation.Duration = new Duration(TimeSpan.FromSeconds(1.5));
        Storyboard.SetTargetProperty(widthAnimation, new PropertyPath(EllipsePointMarker.WidthProperty));
        storyboard.Children.Add(widthAnimation);

        DoubleAnimation heightAnimation = new DoubleAnimation();
        heightAnimation.From = 10;
        heightAnimation.To = 18;
        heightAnimation.AutoReverse = true;
        heightAnimation.Duration = new Duration(TimeSpan.FromSeconds(1.5));
        Storyboard.SetTargetProperty(heightAnimation, new PropertyPath(EllipsePointMarker.HeightProperty));
        storyboard.Children.Add(heightAnimation);
  • sun asked 3 weeks ago
  • last active 3 weeks ago
0 votes
54 views

when i custom PointMarker, the DoubleAnimation not effect on using LineRenderableSeriesViewModel.
But it was effect on using FastLineRenderableSeries in xaml.

using SciChart.Charting.Visuals.PointMarkers;
using SciChart.Charting.Visuals.RenderableSeries;
using SciChart.Drawing.Common;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Animation;

namespace SciChart_DatapointMarkers
{
public class CustomEllipsePointMarker : EllipsePointMarker
{
private readonly Storyboard storyboard = new Storyboard();

    private double lastYValue = 0;

    private double lastXValue = 0;

    public CustomEllipsePointMarker()
        : base()
    {
        DoubleAnimation opacityAnimation = new DoubleAnimation();
        opacityAnimation.From = 0.8;
        opacityAnimation.To = 0.4;
        opacityAnimation.AutoReverse = true;
        opacityAnimation.Duration = new Duration(TimeSpan.FromSeconds(1));
        Storyboard.SetTarget(opacityAnimation, this);
        Storyboard.SetTargetProperty(opacityAnimation, new PropertyPath(EllipsePointMarker.OpacityProperty));
        storyboard.Children.Add(opacityAnimation);

        DoubleAnimation widthAnimation = new DoubleAnimation();
        widthAnimation.From = 14;
        widthAnimation.To = 24;
        widthAnimation.AutoReverse = true;
        widthAnimation.Duration = new Duration(TimeSpan.FromSeconds(1));
        Storyboard.SetTarget(widthAnimation, this);
        Storyboard.SetTargetProperty(widthAnimation, new PropertyPath(EllipsePointMarker.WidthProperty));
        storyboard.Children.Add(widthAnimation);

        DoubleAnimation heightAnimation = new DoubleAnimation();
        heightAnimation.From = 14;
        heightAnimation.To = 24;
        heightAnimation.AutoReverse = true;
        heightAnimation.Duration = new Duration(TimeSpan.FromSeconds(1));
        Storyboard.SetTarget(heightAnimation, this);
        Storyboard.SetTargetProperty(heightAnimation, new PropertyPath(EllipsePointMarker.HeightProperty));
        storyboard.Children.Add(heightAnimation);

        //DoubleAnimation strokeThicknessAnimation = new DoubleAnimation();
        //strokeThicknessAnimation.From = 4;
        //strokeThicknessAnimation.To = 9;
        //strokeThicknessAnimation.AutoReverse = true;
        //strokeThicknessAnimation.Duration = new Duration(TimeSpan.FromSeconds(1));
        //Storyboard.SetTargetProperty(strokeThicknessAnimation, new PropertyPath(EllipsePointMarker.StrokeThicknessProperty));
        //storyboard.Children.Add(strokeThicknessAnimation);
    }


    public override void Draw(IRenderContext2D context, IEnumerable<Point> centers)
    {
        if (centers == null || centers.Count() <= 0)
        {
            return;
        }

        if (this.RenderableSeries != null &&
            this.RenderableSeries.DataSeries != null &&
            (this.RenderableSeries.DataSeries.LatestYValue.CompareTo(this.lastYValue) != 0 ||
            this.RenderableSeries.DataSeries.XMax.CompareTo(this.lastXValue) != 0))
        {
            this.BeginStoryboard(storyboard);
            this.lastYValue = Convert.ToDouble(this.RenderableSeries.DataSeries.LatestYValue);
            this.lastXValue = Convert.ToDouble(this.RenderableSeries.DataSeries.XMax);
        }

        base.Draw(context, new List<Point>() { centers.Last() });
    }

    protected override void RenderToCache(IRenderContext2D context, IPen2D strokePen, IBrush2D fillBrush)
    {
        base.RenderToCache(context, strokePen, fillBrush);

        var width = context.ViewportSize.Width;
        var height = context.ViewportSize.Height;

        var brush = context.CreateBrush(this.RenderableSeries.Stroke);
        context.DrawEllipse(strokePen, brush, new Point(width * 0.5, height * 0.5), 6, 6);
    }
}

}

  • sun asked 4 weeks ago
  • last active 2 weeks ago
0 votes
65 views

Hi,

I have a requirement to validate i.e user dynamically change the stroke and stroke thickness of MajorGridLines of chart. I read through on documentation and I came across :

https://support.scichart.com/index.php?/Knowledgebase/Article/View/17221/37/axis-gridlinesstyle-dynamicresource-or-style-binding-doesnt-work

After reading it make sense, why binding is not working. So I have adopted the approach mentioned into that knowledgebase document. So after following that appoarch Stroke is working, but as soon as I try to update StrokeThickness, the whole chart stops working.

Here is the code of GridLineStyleBehavior class I have used, you can see that in OnSingleGridStrockChanged method, I am setting Stroke, StrokeThickness and StrokeDashArray properties. So when I tried to apply all three nothing worked but if i apply only stroke it worked as expected. Can you provide some direction for how to achieve the expected result.

using System;
using System.Linq;
using System.Windows;
using System.Windows.Media;
using System.Windows.Shapes;
using System.Windows.Threading;
using SciChart.Charting.Visuals;
using SciChart.Charting.Visuals.Axes;

namespace FinSysPlatform.Common.Charts.Behavior
{
    public class GridLineStyleBehavior
    {
        private static ChartGridType _chartGridType;
        private static SolidColorBrush _singleGridStrock;
        private static Visibility _singleGridVisibility;
        private static Thickness _singleGridStrockThickness;

        #region DP SingleGridStrock

        /// <summary>
        /// SingleGridStrock
        /// </summary>
        public static readonly DependencyProperty SingleGridStrockProperty = DependencyProperty.RegisterAttached(
        "SingleGridStrock", typeof(SolidColorBrush), typeof(GridLineStyleBehavior), new PropertyMetadata(Brushes.Black, OnSingleGridStrockChanged));

        private static void OnSingleGridStrockChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            if (!(d is AxisBase axisBase))
            {
                throw new ArgumentException(@"unexpected object", nameof(d));
            }
            if (e.NewValue is SolidColorBrush color)
            {
                Style newStyle = new Style(typeof(Line));

                newStyle.Setters.Add(new Setter(Line.StrokeProperty, e.NewValue));
                newStyle.Setters.Add(new Setter(Line.StrokeThicknessProperty, 5));
                newStyle.Setters.Add(new Setter(Line.StrokeDashArrayProperty, "1 0"));


                axisBase.MajorGridLineStyle = newStyle;
            }
        }
        public static void SetSingleGridStrock(DependencyObject element, SolidColorBrush value)
        {
            element.SetValue(SingleGridStrockProperty, value);
        }

        public static SolidColorBrush GetSingleGridStrock(DependencyObject element)
        {
            return (SolidColorBrush) element.GetValue(SingleGridStrockProperty);
        }

        #endregion



    }


}
0 votes
56 views

Hi,

CompositeAnnotation works perfectly and easy to use, but I need it in MVVM. CompositeAnnotationViewModel looks the same, but it is not visible. This is my code:

AnnotationViewModels.Add(new CompositeAnnotationViewModel()
{
    Annotations = new ObservableCollection<IAnnotationViewModel>()
    {
        new VerticalLineAnnotationViewModel
        {
            VerticalAlignment = VerticalAlignment.Stretch,
            Stroke = Colors.Blue,
            StrokeThickness = 2,
            IsEditable = true,
            StrokeDashArray = new DoubleCollection() { 2, 2 },
            CoordinateMode = AnnotationCoordinateMode.Relative,
            X1 = 0
        },
        new VerticalLineAnnotationViewModel
        {
            VerticalAlignment = VerticalAlignment.Stretch,
            Stroke = Colors.Blue,
            StrokeThickness = 2,
            IsEditable = true,
            StrokeDashArray = new DoubleCollection() { 2, 2 },
            CoordinateMode = AnnotationCoordinateMode.Relative,
            X1 = 1
        }
    },
    IsEditable = true,
    X1 = 3,
    X2 = 5
});

What is my mistake?

0 votes
0 answers
56 views

I want to implement in scichart3d viewport3d geometry object select
entity object (viewport3d geometry object) selection is not Support.
so i think I tried to put a series in the inside of an object so that I could select it.
but series overwritten with viewport3d object are not selected.
so I made it disappear temporarily when I clicked on an object, but it was not practical enough.

Below is an example I wrote.
I hope I can help you see this.

enter link description here

Is there any other way to implement the ability to select viewport3d geometry objects?

0 votes
0 answers
80 views

Hello, SciChart team!
i’m having some troubles with dated 3D charts.
so what do i need is to display samples which have 65k double points and a DateTime
Firstly i thought waterfall series would fill my needs, but i encountered these problems:
1. Charts wouln’t render Large series like 10 slices with 65k points per slice, 15k is ok (the charts just hang and don’t display anything for tens of minutes)
2. so the series would appear 10×15000, but i had issues with autorange and zooming when interval between slices is as small as 2 seconds (AutoRange is set to always)
my guess is that i need to set properties StepZ and StartZ correctly, but I couldn’t figure it out. i thought “StepZ” should be TimeSpan or smth like that, but it is DateTime too, so i tried some variations and didn’t succeed. could you please explain these properties’ use?
3. maybe this is feature but why do series go below 0 in the Y direction?

so then i reallized that i don’t always need to fill series with color and Waterfall series don’t quite fit ( even with transparent fill they have border lines on series start and end, and i thought i would add several PointLine RenderableSeries, one for each sample with fixed Z Datetime, but when i added such Renderable Series i get “SciChart3DSurface didn’t render, because an exception was thrown: Exception thrown: ‘System.IndexOutOfRangeException’ in SciChart.Charting3D.dll”
i played with example from latest SciChart version and attached altered solution to this post
so hit sidebar’s “Test” button and try both methods AddPointLineRenderSeries and AddWaterfallRenderSeries

Thanks in advance!
Best regards,
Alexander

0 votes
65 views

I have a problem with the alignment of the Minor Grid Line.
As you can see on the ScreenShot, the minor lines are not synchronized with the major line. They are not in the same x-axis position.
How can I do this?

Furthermore, I would like to have a dotted line instead of the dotted line. How can I do this?
How can I define the number of points between the major grids? currently there are 15, but I do not define this, it must be determined internally by the SciChart.

Thank you for your support.
Andreas

0 votes
65 views

Hello, SciChart team
i’m having an issue using SciCHart Examples Suite, and implementinting 3D charts
so when i choose some of 3d examples in Examples Suite i see a pitch black field instead of chart. after experiments with settings i figured out that 3D charts appear if i set “Use Alternative Fill Source” setting to true, which is in the 2D section of settings (not so obvious solution)
so the question is – how do i implement 3dcharts and ensure that they will run on clients’ workstations?
i’ve just updated SciChart to v5.1.1.11473
i have nvidia gtx 1050ti and fresh 398.82 drivers
i attach images of Examples Suite

2 votes
47 views

Hi, I am currently working with the DataPointSelectionModifier with StackedColumnRenderableSeriesViewModel series. I currently am able to get the data point with the correct values whenever I click on a column but it seems that I am not able to change the selection fill of the column.

All I can seem able to do is changing the color of the whole series, but that is not what I am looking for.

Best Regards.

2 votes
60 views

Hi ,

I am currently using the DataPointSelectionModifier for StackedColumnRenderableSeriesViewModel and I am having an issue trying to have a single selection that is togglable.

I am currently not AllowingMultiSelection so the default value is SelectionMode.Replace, which, in case you click on the same column, it will deselect that column and then select it again. Is there a way around this?

Best Regards.

0 votes
100 views

Hi

I have an numeric Y axis where I want the labels to be right aligned (see attached image).

I tried to change the TickLabelStyle in different ways but with no luck. Can you help me with this basic request? 🙂

/Flemming

0 votes
81 views

create double parallel line using lineannotation, when the line draged, the other line stay parallel.

  • sun asked 1 month ago
  • last active 1 month ago
0 votes
138 views

I have bound the annotation collection to the scichart as shown below.

Annotations="{s:AnnotationsBinding ChartAnnotations}"

And in the code behind (view model) i am adding annotations to the collection like,

   private AnnotationCollection _ChartAnnotations = new AnnotationCollection();
   public AnnotationCollection ChartAnnotations
   {
      get { return _ChartAnnotations; }
      set
      {
         if (_ChartAnnotations == value)
            return;

         _ChartAnnotations = value;
         OnPropertyChanged("ChartAnnotations");
      }
   }

   TextAnnotation annotation = new TextAnnotation();
   annotation.X1 = FirstX;
   annotation.Y1 = 2.0;
   annotation.Text = tempData1[(i - 1) >= 0 ? (i - 1) : 0].PacketType.ToString();
   ChartAnnotations.Add(annotation);

But I am not getting any annotation when I run it, moreover, the original scichart series is also getting disturbed.

Would be grateful if you look into the issue.
Thanks

  • Ashvij asked 2 months ago
  • last active 2 months ago
1 vote
103 views

I need the length of the plot area in pixels. I don’t have access to SciChartSurface and it’s XAxis field. I have only ObservableCollection and my NumericAxisViewModel. Is it possible to get the length from them? Or what is the best way to get it in my case?

0 votes
100 views

I am using the LegendModifier to bind my RenderableSeries to my legend.

In my legends Datatemplate, I have a checkbox and a colour picker.

I notice the LegendData object is of ChartDataObjectBase type. I would like to group my data in my legend (eg, with a label), rather than just display the list.

Is this possible, similar to the images attached ?

0 votes
139 views

Hi

We use ViewportManager to automatically calculate the visible range of Y-axis for all series in the chart.

   <s:SciChartSurface Margin="0, 5, 0, 0"  Grid.Column="2"
                           ViewportManager="{Binding ViewportManager}"
                           MinHeight="250" MinWidth="250"
                           x:Name="MainChartSurface"
                           RenderableSeries="{s:SeriesBinding SeriesVms}"
                           ChartTitle="{Binding ChartModel.Title}"
                           Loaded="MainChartSurface_Loaded"
                           YAxes="{Binding YAxes}"
                           XAxes="{Binding XAxes}"
                           Style="{StaticResource YAxisStyle}"
                           Annotations="{s:AnnotationsBinding ChartModel.Annotations}">
      :
      : (omitted for brevity)
   </s:SciChartSurface>

This approach works fine for one chart.

We now have an additional requirement, which is to have the same VisibleRange for Y-axis over multiple charts. Basically, the VisibleRange should be set to be the [Min, Max] range over all the series in all charts.

Is there a way to achieve this with ViewportManager ?
Is there a way to make several charts related and assign it a common instance of ViewportManager?

BR, Gianni

0 votes
122 views
         <s:NumericAxis AxisTitle="Value"  VisibleRange="{Binding VisibleRange1}" Visibility="Collapsed"  DrawMajorBands="False" />

In ViewModel:

private static int r1 = 70;
private static int r2 = 50;

private IndexRange _visibleRange1 = new IndexRange(r2, r1);

public IndexRange VisibleRange1  => _visibleRange1;

I get the exception:
‘Axis type NumericAxis requires that VisibleRange is of type SciChart.Data.Model.IndexRange’

What am I doing wrong?

Thanks,
-Robert

0 votes
140 views

Hello
I’m working on a WPF app. Everything is OK except that I don’t understand how to render the series above the annotations.
The XAML code is the following:

<s:SciChartSurface Name="sciChartSurface"
                   s:ThemeManager.Theme="SciChartv4Dark"
                   Annotations="{Binding Path=Annotations}"
                   ChartTitle="{Binding Path=GraphTitle}"
                   DataContext="{Binding Path=ChartViewModel,
                   RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type charts:ChartView}}}"
                   FocusVisualStyle="{x:Null}"
                   Focusable="True"
                   SeriesSource="{Binding Path=Series}"
                   Padding="0 5 8 0">

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


         [...]



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

    <!--  Create an X Axis  -->
    <s:SciChartSurface.XAxis>
        <s:NumericAxis AutoRange="{Binding Path=XAxis.AutoScaling,
                                           Converter={StaticResource BooleanToAutoRangeConverter}}"
                       AxisTitle="{Binding Path=XAxis.AxisTitle}"
                       DrawMajorGridLines="{Binding Path=XAxis.ShowGridLines}"
                       DrawMinorGridLines="False"
                       DrawMinorTicks="True"
                       GrowBy="0, 0.1"
                       AxisBandsFill="#1c1c1e" 
                       VisibleRange="{Binding Path=XAxis.AxisRange,
                                              Mode=TwoWay}"
                       MajorDelta="{Binding XAxis.MajorDelta, Mode=TwoWay}"
                       MinorDelta="{Binding XAxis.MinorDelta, Mode=TwoWay}"
                       AutoTicks="{Binding XAxis.AutoTicks}" 
                       />
    </s:SciChartSurface.XAxis>

    <!--  Create a Y Axis  -->
    <s:SciChartSurface.YAxis>
        <s:NumericAxis AutoRange="{Binding Path=YAxis.AutoScaling,
                                           Converter={StaticResource BooleanToAutoRangeConverter}}"
                       AxisAlignment="Left"
                       AxisTitle="{Binding Path=YAxis.AxisTitle}"
                       DrawMajorGridLines="{Binding Path=YAxis.ShowGridLines}"
                       DrawMinorGridLines="False"
                       DrawMinorTicks="True"
                       GrowBy="0.1, 0.1"
                       IsPrimaryAxis="True"
                       AxisBandsFill="#1c1c1e" 
                       VisibleRange="{Binding Path=YAxis.AxisRange,
                                              Mode=TwoWay}"
                       MajorDelta="{Binding YAxis.MajorDelta, Mode=TwoWay}"
                       MinorDelta="{Binding YAxis.MinorDelta, Mode=TwoWay}"
                       AutoTicks="{Binding YAxis.AutoTicks}"
                       />
    </s:SciChartSurface.YAxis>
</s:SciChartSurface>

Edit: this is the code that creates the horizontal annotation:

 /// <summary>
    /// Creates a chart annotation
    /// </summary>
    /// <param name="a"></param>
    /// <returns></returns>
    private AnnotationBase CreateChartAnnotation(Annotation a)
    {
        HorizontalLineAnnotation annotation;

        //not used??
        //ColorToBrushConverter brushConverter = new ColorToBrushConverter();

        annotation = new HorizontalLineAnnotation() { Y1 = a.ThresholdValue.Value };
        annotation.Stroke = new SolidColorBrush((Color)ColorConverter.ConvertFromString(a.Stroke));
        annotation.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
        annotation.IsEditable = false;
        annotation.LabelTextFormatting = string.Format("{0} 0.0", a.Label);
        annotation.StrokeThickness = 2;
        annotation.LabelPlacement = LabelPlacement.Axis;
        annotation.ShowLabel = a.ShowLabel;
        if (a.DashArray != null)
        {
            annotation.StrokeDashArray = new DoubleCollection(a.DashArray);
        }


        return annotation;
    }

I tried to set AnnotationCanvas.BelowChart but the behaviour is very strange: the horizontal annotation line is no more continuous
I attached two jpegs

Regards
Gianpaolo

0 votes
167 views

Dear all,
I need to display an annotation label based on regional settings, especially grouping separator.

The annotation is define as below :

<s:HorizontalLineAnnotation x:Name="_threshold" HorizontalAlignment="Stretch"
                                        LabelPlacement="Axis" 
                                        ShowLabel="True"
                                        Y1="{Binding LiveThreshold,Mode=TwoWay}" 
                                        />

If I check the row value LiveThreshold it is properly formatting according to regional setting and if we display it in another windows control through binding all is ok ans seen as 1,234 (“,” as grouping separator).

But when we apply that value to Y1 to the Annotation above, the result I get is a value which is not using the format of the value it self but overwrite it and for instance Grouping digit separator is completely ignore from regional seetings and display as : 1234

Q1 : Why the Annotation is not using the actually formatted string that I am delivering ?

I have try to add the LabelTextFormatting =”n” property. If I am in English Us in regional settings, then it display correctly then the Digit grouping as 1,234 .

But if I switch for instance to French in regional settings, then there is no digital grouping in French formatting so return data should be 1234. Instead I have an exception of “Input string is not a valid format” , which is wrong because the raw data value is correctly formed.

Q2 : Why adding the LabelTextFormatting =”n” crash in other language than US where digital grouping is different than “,” ?

Does anyone have met this case ?

Thanks for tips if any

  • sc sc asked 2 months ago
  • last active 2 months ago
0 votes
168 views

Hello support team.

I have a question about the resampling modes and their behavior.
I have a LineRenderableSeries with the resampling mode.mid. Therefore, depending on the zoom level and available pixels of the display screen, the information of the min and max values are lost. I had the idea to create a second LineRenderableSeries with the Opacity 0.5 and the ResamplingMode.Min Max. Thus I have behind the main line with the resampling mode.mid a “cloud” with the MinMax info. This allows the user to see this information as well. However, I would deactivate this cloud if it is not necessary due to the zoom level and the pixels.
How can I request this from SciChartControl? Or does it make more sense to use a different functionality?
I use the Mvvm classes LineRenderableSeriesViewModel, and XyDataSeries.

Thank you very much!

0 votes
0 answers
106 views

I have a TabControl that contains a dynamic number of chart panes via an ItemsControl. Inside the ItemsControl’s ItemsTemplate is a single ScichartSurface with bindings to the RenderableSeries, XAxis, YAxes, and VerticalChartGroup.

The xaml looks something like this:

<s:SciChartSurface name="Chart" RenderableSeries="{Binding rSeries}" XAxis={Binding xAxis} YAxes={Binding yAxes} s:SciChartGroup.VerticalChartGroup="{Binding vGroup}">

Within the surface, I have a ModifierGroup that contains (in order) a RubberbandXyZoomModifier (XAxisOnly), MouseWheelZoomModifier, ZoomPanModifier, ZoomExtentsModifier, and a custom mod call TimeSegmentSelectionModifier. All of these modifiers have their ReceiveHandledEvents property set to True, they are all under the same MouseEventGroup, and they all seem to work fine under normal circumstances.

Note: The Rubberband and TimeSegment modifiers are inversely set to Enabled. Meaning, only one of them functions at a time.

My issue is primarily with the RubberBand Mod:

Let’s say I have 5 chart panes being displayed and I want to zoom in; If I click and drag within the 3rd chart, every chart zooms correctly.
If I click withing the 3rd chart, drag the mouse outside of that chart (anywhere else on my screen) and let go, then only charts 1, 2, and 3 are zoomed correctly. Charts 4 and 5 won’t budge and act as if I had merely zoomed to extents.

This happens with any number of chart panes and the issue occurs on whatever pane I happened to be zooming in on.

I’ve been troubleshooting this issue for a few days now and I don’t know where else to look.
Any help is greatly appreciated.

1 vote
133 views

I created a custom annotation. In the custom annotation, I made a SciChartLegend and bind its Legend Data to LegendData of legendmodifier and also give the element name of it. But the problem I am facing is it is not updating the series info in the SciChartLegend when I am adding the series dynamically. But as I am using the VS 2017, I can change the code in xaml in runtime. So when I change the binding mode of legenddata like earlier it has Mode = OneWay, Now I delete the OneWay and type again the OneWay, now everything works fine. But on the first time, like on no change in the xaml , it is not updating the series info.

Here is my code for Legend Modifier :

 <s:LegendModifier x:Name="legendModifierTimeChart" ShowLegend="True" Orientation="Vertical" Margin="10"
                   LegendPlacement="Right" GetLegendDataFor="AllSeries" Focusable="True"
                   ShowVisibilityCheckboxes="True" ScrollViewer.VerticalScrollBarVisibility="Auto"
                   ScrollViewer.CanContentScroll="True" ShowSeriesMarkers="True"/>

Here is my code for Custom Annotation SciChartLegend:

<s:CustomAnnotation X1="0" Y1="0" CoordinateMode="Relative" IsEditable="True">
    <Border BorderThickness="3" BorderBrush="LightGray" Margin="10">
        <s:SciChartLegend x:Name="legendControl1"
            ScrollViewer.HorizontalScrollBarVisibility="Auto"
            ScrollViewer.VerticalScrollBarVisibility="Auto"
            LegendData="{Binding LegendData.SeriesInfo, ElementName=legendModifierTimeChart, Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
            ShowVisibilityCheckboxes="True"   IsHitTestVisible="True"  />
    </Border>
</s:CustomAnnotation>

It not works until I change the Mode on runtime, Like It already has written OneWay, but on runtime if I delete that and again write

OneWay, everything works fine.

Please help me in solving this issue. It is a humble request.

0 votes
159 views

How to programmatically add Scrollbars to MVVM instantiated axes?

I added DateTimeAxisViewModel and NumericAxisViewModel to my code. That works from so far. A way to add scrollbars i couldnt find a some tries.

Are there some ways to get this done? Maybe change the templates of the axes or the chart?

Best regards

0 votes
143 views

Hello support team,

We have to realize the following request:
– Yt chart with DateTime as X-axis and double values on the Y-axis
– The chart should display a user-defined area on startup (e.g. 20 sec) After the chart has run for 20 seconds ( i.e. 20 seconds), the animated scrolling should start. By default, the chart behaves as follows: The X-axis area fills up to 20 seconds and then starts scrolling. We want the chart to display 20 seconds on the X-axis at the start and fill up.

I am aware that I can implement this behavior myself. However, the question arises whether I can realize this directly with a basic functionality.

Thank you!

0 votes
114 views

Hello support team,

We are currently starting a complete redesign of our SciChart implementation from V3.x to V5.x. In V5.x the MVVM pattern is now supported and we would like to use this.
Our main focus is on the performance of the SciChart component. Now the question arises whether the use of the MVVM API is questionable for exactly this reason (performance).
Does it make a big difference whether I address the series directly or via the MVVM API?
Thank you very much for your support!

0 votes
325 views

Hi, is there a way to get the number of major ticks lines and to calculate the difference of two consecutive major ticks lines values? Thanks.

  • M. C. asked 2 months ago
  • last active 2 months ago
0 votes
122 views

I have a DateTimeAxis.

While I can see a way to template the format the text for all the axis tick labels, I need a way to completely override what is being rendered for each item. I want, for example, today’s date to be in bold, and to apply other text/buttons below the axis label conditionally, depending on logic specific to that date.

Is this possible?

0 votes
107 views

I’ve enabled the Rollover on my chart, and I am trying to make a custom AxisLabelTemplate, which is easy to do if you are just looking to add some text/format around the AxisFormattedDataValue.

However, what i really want to do is to use the AxisInfo.DataValue to look up a specific string related to each of the Avis values, and set this as my label text;

ie, if my axis DataValues are “1, 2, 3, 4, 5″I want the rollover text to read “1 – Dog”, “2 – Cat”, “3 – Fish”, “4 – Mouse”, “5 – Aardvark”

Is this possible?

Thanks

0 votes
140 views

Hello,

I’m writing regarding the IsCenterAxis property on the AxisBase object. I am creating biplots in my application and have set this property to true but the axes stay on the outside edge of the chart. Is there something else I must do to achieve this? I found a link in the forum about doing exactly this, but it was broken.

This is the broken link on the Navigation Pane page about “Placing Axis Central in the Chart”
https://www.scichart.com/documentation/v5.x/www.scichart.com/wpf-chart-example-central-xaxis-and-yaxis

Also, I need to draw a unit circle on my chart and I was curious what the best way to go about doing that would be.

Thank you

0 votes
0 answers
110 views

Hello!
I’m writting an app with using SciChart Surface. After little changes in XAML code, that had no effect on surface, those surface show nothing. I turned all made changes back to correct working version but this didn’t help. What can it be? I attach veiw of surface that a see now. (Theme is presetup “Electric”)

0 votes
0 answers
117 views

Hello Guys
I want to know how to set up a Xaxis major line manually.(NumericAxis )

For example,
If the range of the x-axis is 1 to 100

Major lines are 0,10,30,35,50 … 100

I want to set it freely.

1 vote
133 views

Hello, SciChart Team!
i have an issue using mouse drag event ( RubberBandXyZoomModifier, ZoomPanMidifier). the message says “NullReferenceException in SciChart.Charting.dll ” or “Thread.cs not found” from time to time.
after some experiments i figured out that the app starts to crush after i change XAxis type .
i have a simple mvvm user control used to display both arrays of double and datebound data, XAxes of SciChart Surfase is bound to an observable collection of IAxis elements. if i need to change chart type i clear this collection and create an axis of desired type (DateTimeAxisViewModel or NumericAxisViewModel). after that the series can be added, but zooming causes crash with nearly to no info.

i attached a solution, which lacks only scichart dlls in order to run (hopefully), Window_Loaded method has a commented line which changes chart type and makes app crush on zooming, would be nice if you checked it out.
Thanks in advance!
Alexander

0 votes
0 answers
112 views

I’m trying to run my WPF with SciChart aplication in the separate AppDomain, but method SciChartSurface.SetRuntimeLicenseKey() is not working for me – no any exception, but in SciChart control I can see “Sorry! Your trial of SciChart has expired. Please contact sales if you require an extension.” instead of Chart.

In the default AppDomain it works fine.

I tried to run SetRuntimeLicenseKey method from both AppDomains – Default and separate, but without luck.

0 votes
0 answers
105 views

Hello!

I want to use three colors in Xaxis.
But I do not know how to use multiple colors at once.

can put multiple colors through Xaxes,
but when move the scroll bar, the Xaxes colors do not move together. (Top and Buttom Xaxes colors)
I want to move the colors of both Xaxes together. or want to assign multiple colors(over the 3 Colors) to one Xaxis.

You can see the code and graphs through the image.

Tell us how to use it.

Thank you!

1 vote
141 views

Hello,

I am currently taking a v5 test drive and noticed the following problem that would be a show stopper for me:

When syncing several chats via shared mouse events and shared visible x-Axis range I noticed that when zooming in that the chart axes get out of sync, sometimes significantly by several seconds on a CategoryDateTimeAxis, DateTimeAxis, but also apparently on numeric axes.

The error can easily be replicated when looking at your Example Suite , specifically the “Sync Multi Chart Mouse” sample. When you zoom into the chart you notice that the x-Axes on each chart are not aligned anymore. In this specific example when zooming in so that the minimum on the left side of the screen lies at around value 10 and the maximum at around 55 then moving with the mouse on the top chart to 52.44 shows a value of 52.53 on the lower chart. That is completely out of sync and gets worse on DateTime and Category DateTime axes.

Could anyone (and support) please chime in so I can understand what is going on and whether there is a fix for this or whether this is a bug that has been around for some time and cannot be adjusted within a reasonable amount of time?

I have been pulling my hairs over this and spent hours on different approaches, via ViewPortManager and the updating of shared visible range in both code and xaml. All to no avail and given the example code also exhibits the same issue I doubt it relates to a wrong implementation on my end.

Thanks a lot,
Matt W.

  • bbmat asked 3 months ago
  • last active 2 months ago
0 votes
148 views

i want o change SciChartInteractionToolbar default rubber band zoom mode to pan move .how to do it ?

0 votes
136 views

I have a strip chart (see attached image), which uses VerticalLineAnnotation to mark events. I add my own AnnotationLabel with the Text showing the event id, and a ToolTip with detailed event information. I’m currently setting the LabelPlacement as Axis. I like the look of that AnnotationLabel style, but I’d really like it to be above the plot so it doesn’t clutter up the axis. Is there a nice way to do this?

0 votes
155 views

Dear all,

I have to perform some operation inside a chart ViewPortManger.BeginInvoke()

Is there a way to know when the BeginInvoke() method is completed or do I have to implement an custom event ?

regards

  • sc sc asked 3 months ago
  • last active 3 months ago
0 votes
152 views

Hello,

I developed a program using scichart.

Unfortunatly, It can not work on some computers.

There are same hardware and OS(Window 7).

I found this problem when I use DirectX.

I have referenced your code. and My code had ChangeRenderSurface method.

but It can not work well…

I think the problem occurred when I called scichart3d.

What is wrong?

Does it need to install anything else?

If you have a solution , please tell me.

  • Guest asked 3 months ago
  • last active 3 months ago
1 vote
530 views

Dear all,

In our application we have a chart that we need to explot into a BMP file at a given size.
For our scenario the process is as below :

1 – From the chart which is display to user at a default size we force the Width and Height of the chart to our desired size

mysciChart.Width = 480;
mysciChart.Height = 220;
mysciChart.UpdateLayout();

2 – We can then use the build in Export To file method to export the file

if (mysciChart.ActualWidth > 10 && mysciChart.ActualHeight > 10)
{
    mysciChart.ExportToFile(myBMPFile, ExportType.Bmp, false);
    }

The chart is then exported to correct size but it is not refresh with data as shown in picture attached

please note that the code above is executed in the Main UI thread dispatcher

Any idea how to get the chart properly render in Export, is there a kind of refresh something to call on the chart before export when we change its size ?

Thnaks for help

  • sc sc asked 3 months ago
  • last active 2 months ago
Showing 1 - 50 of 2k results