Pre loader

Forums

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0 votes
5k views

Related to: https://www.scichart.com/questions/wpf/exporttofile-exception-the-provided-dependencyobject-is-not-a-context-for-this-freezable

I got no reply…

I’m able to reproduce the issue in the thread above, or at least a similar issue with version 5.4

What my code has is a “Start/Stop” button. When “Start” is pressed, the Axes are cleared and re-initialized.
If just using Start / Stop then it works, but if I export the chart into an image (a PNG in that matter), and after few seconds I click on the “Start”, then few seconds later, the software crash on the exception mentioned above.

From what I’ve been able to debug, the Export to image create a new chart control with all the bindings, and renders it to an image.
When I click on start, then the Axis (in this case, I see that the Y Axes are the ones that cause it) are cleared and created in my view model, and therefore it also affects the chart.
The binding of the chart that was created for the rendering is probably not cleared, so it gets the change event after some time, and Arrange is being called.

I see that ArrangeOverride on the AxisPanel is called, and _axisTitle,Arrange is called at this point the application crashes.

Please fix it.

Btw, this is the stack trace:

Exception Info: System.ArgumentException
at System.Windows.Freezable.RemoveContextInformation(System.Windows.DependencyObject, System.Windows.DependencyProperty)
at System.Windows.Freezable.RemoveInheritanceContext(System.Windows.DependencyObject, System.Windows.DependencyProperty)
at System.Windows.DependencyObject.RemoveSelfAsInheritanceContext(System.Windows.DependencyObject, System.Windows.DependencyProperty)
at System.Windows.Freezable.OnFreezablePropertyChanged(System.Windows.DependencyObject, System.Windows.DependencyObject, System.Windows.DependencyProperty)
at System.Windows.Media.RenderData.PropagateChangedHandler(System.EventHandler, Boolean)
at System.Windows.UIElement.RenderClose(System.Windows.Media.IDrawingContent)
at System.Windows.Media.RenderDataDrawingContext.DisposeCore()
at System.Windows.Media.DrawingContext.System.IDisposable.Dispose()
at System.Windows.UIElement.Arrange(System.Windows.Rect)
at MS.Internal.Helper.ArrangeElementWithSingleChild(System.Windows.UIElement, System.Windows.Size)
at System.Windows.Controls.ContentPresenter.ArrangeOverride(System.Windows.Size)
at System.Windows.FrameworkElement.ArrangeCore(System.Windows.Rect)
at System.Windows.UIElement.Arrange(System.Windows.Rect)
at System.Windows.Controls.Control.ArrangeOverride(System.Windows.Size)
at System.Windows.FrameworkElement.ArrangeCore(System.Windows.Rect)
at System.Windows.UIElement.Arrange(System.Windows.Rect)
at MS.Internal.Helper.ArrangeElementWithSingleChild(System.Windows.UIElement, System.Windows.Size)
at System.Windows.Controls.ContentPresenter.ArrangeOverride(System.Windows.Size)
at System.Windows.FrameworkElement.ArrangeCore(System.Windows.Rect)
at System.Windows.UIElement.Arrange(System.Windows.Rect)
at System.Windows.Controls.Control.ArrangeOverride(System.Windows.Size)
at System.Windows.FrameworkElement.ArrangeCore(System.Windows.Rect)
at System.Windows.UIElement.Arrange(System.Windows.Rect)
at System.Windows.Controls.Control.ArrangeOverride(System.Windows.Size)
at System.Windows.FrameworkElement.ArrangeCore(System.Windows.Rect)
at System.Windows.UIElement.Arrange(System.Windows.Rect)
at SciChart.Charting.Themes.AxisPanel.ArrangeOverride(System.Windows.Size)
at System.Windows.FrameworkElement.ArrangeCore(System.Windows.Rect)
at System.Windows.UIElement.Arrange(System.Windows.Rect)
at System.Windows.Controls.Grid.ArrangeOverride(System.Windows.Size)
at System.Windows.FrameworkElement.ArrangeCore(System.Windows.Rect)
at System.Windows.UIElement.Arrange(System.Windows.Rect)
at System.Windows.Controls.StackPanel.StackArrangeHelper(System.Windows.Controls.IStackMeasure, System.Windows.Controls.IStackMeasureScrollData, System.Windows.Size)
at System.Windows.Controls.StackPanel.ArrangeOverride(System.Windows.Size)
at System.Windows.FrameworkElement.ArrangeCore(System.Windows.Rect)
at System.Windows.UIElement.Arrange(System.Windows.Rect)
at System.Windows.Controls.Border.ArrangeOverride(System.Windows.Size)
at System.Windows.FrameworkElement.ArrangeCore(System.Windows.Rect)
at System.Windows.UIElement.Arrange(System.Windows.Rect)
at System.Windows.Controls.Control.ArrangeOverride(System.Windows.Size)
at System.Windows.FrameworkElement.ArrangeCore(System.Windows.Rect)
at System.Windows.UIElement.Arrange(System.Windows.Rect)
at System.Windows.Controls.StackPanel.StackArrangeHelper(System.Windows.Controls.IStackMeasure, System.Windows.Controls.IStackMeasureScrollData, System.Windows.Size)
at System.Windows.Controls.StackPanel.ArrangeOverride(System.Windows.Size)
at System.Windows.FrameworkElement.ArrangeCore(System.Windows.Rect)
at System.Windows.UIElement.Arrange(System.Windows.Rect)
at MS.Internal.Helper.ArrangeElementWithSingleChild(System.Windows.UIElement, System.Windows.Size)
at System.Windows.Controls.ItemsPresenter.ArrangeOverride(System.Windows.Size)
at System.Windows.FrameworkElement.ArrangeCore(System.Windows.Rect)
at System.Windows.UIElement.Arrange(System.Windows.Rect)
at System.Windows.Controls.Border.ArrangeOverride(System.Windows.Size)
at System.Windows.FrameworkElement.ArrangeCore(System.Windows.Rect)
at System.Windows.UIElement.Arrange(System.Windows.Rect)
at System.Windows.Controls.Control.ArrangeOverride(System.Windows.Size)
at System.Windows.FrameworkElement.ArrangeCore(System.Windows.Rect)
at System.Windows.UIElement.Arrange(System.Windows.Rect)
at System.Windows.Controls.Grid.ArrangeOverride(System.Windows.Size)
at System.Windows.FrameworkElement.ArrangeCore(System.Windows.Rect)
at System.Windows.UIElement.Arrange(System.Windows.Rect)
at System.Windows.Controls.Border.ArrangeOverride(System.Windows.Size)
at System.Windows.FrameworkElement.ArrangeCore(System.Windows.Rect)
at System.Windows.UIElement.Arrange(System.Windows.Rect)
at System.Windows.Controls.Control.ArrangeOverride(System.Windows.Size)
at System.Windows.FrameworkElement.ArrangeCore(System.Windows.Rect)
at System.Windows.UIElement.Arrange(System.Windows.Rect)
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(System.Object)
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(System.Object)
at System.Windows.Media.MediaContext.RenderMessageHandler(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
at System.Windows.Application.RunDispatcher(System.Object)
at System.Windows.Application.RunInternal(System.Windows.Window)
at Unitronics.Shell.UI.App.Main()

0 votes
10k views

I tried the example “Sync multi chart mouse”, the ZoomPanModifier works well.

I have three charts sharing the mouse:MouseManager.MouseEventGroup=”cellTimeModifierGroup”. RubberBandXyZoomModifier and ZoomExtentsModifier work fine, but ZoomPanModifier does not work.

Do you know what will potentially breaks ZoomExtentsModifier when used for Sync multi chart?

  • Xifeng Wen asked 10 years ago
  • last active 10 years ago
0 votes
4k views

I’d like to display the values of series data points using TooltipModifer.

However, if you hold the mouse cursor over the series, the tool tip will be displayed even if there are no data points.

Attach a movie to explain the phenomenon.

I would like to display the tool tip only when I hold the mouse cursor where I have the data point, how can I do it?

0 votes
9k views

Hello Friends ,

   Sync two Chart in Android Bottom chart can be change on top chart touch

We are looking a solution where we want show two chart at Top and Bottom in Android Screen.based on Top chart changed by gesture /finger touch should be expend/shrink like zoom in and out bottom chart

Assume at top chart data range has between 0 to 3,00,000 , I want to capture in bottom chart only selected/touched part in with expanded form.

I have attached below screen shot which may be helpful.

Solution can be like this but not able to get code for this implementation

https://blog.scichart.com/content/images/2021/06/Navigate-ECG-strip-with-Pocket-ECM.gif

https://blog.scichart.com/android-app-to-view-long-term-ecg-signals/

I appreciate any help regarding this issue.

-1 votes
9k views

I have a vertically stacked chart with 3 y-Axis. How can I fade out each y-Axis independant?

0 votes
6k views

When showing a new view, there are some annotations (from an AnnotationCollection) on the panel, but the RenderableSeries is empty. Is it possible to use the scrollbar to zoom in details of annotations?

  • yi zheng asked 5 years ago
  • last active 5 years ago
0 votes
3k views

Hi, I’ve trying to run the charts in emulator and it works fine with recyclerview ,but when i try to render chart in a fragment it doesn’t shows.The same fragment render charts in device and issue with emulator.I’m using geny motion. Thanks in Advance

0 votes
7k views

Hi

I’ve followed your example for a Custom Label on X axis , I changed from the init parameter from IAxis to IAxisCore as defined in ProviderBase, otherwise it wouldn’t have compile. But after passing from public override string FormatLabel I got this error

Unable to cast object of type 'SciChart.Charting.Visuals.Axes.LabelProviders.DefaultTickLabelViewModel' to type 'SciChart.Charting.Visuals.Axes.LabelProviders.NumericTickLabelViewModel'.

Here my definition of the XAxis

  <s:NumericAxis x:Name="MainChartXAxis" 

                     VisibleRangeChanged="XAxis_VisibleRangeChanged"
                        AutoTicks="False"
                           AxisTitle="Programming Language"
                           LabelProvider="{Binding XLabelFormatter}"
                           MajorDelta="1"
                           MinorDelta="0.2"
                           VisibleRange="-0.5,4.5"
                      >
            </s:NumericAxis>

I have a BaseRenderableSeries defined as follows

      <s:SciChartSurface Name="sciChart" 
                    Grid.Row="0"
                    BorderThickness="0"

                    Padding="0"
                       s:SciChartGroup.VerticalChartGroup="myCharts"
                    >

        <!--  Declare RenderableSeries  -->
        <s:SciChartSurface.RenderableSeries>
            <s:FastLineRenderableSeries x:Name="lineSeries"

                                  StrokeThickness="2"
                                  PaletteProvider="{StaticResource GainLossPaletteProvider}"
                                  s:CursorModifier.TooltipTemplate="{StaticResource CursorTooltipTemplate}"
                                 >
                <s:FastLineRenderableSeries.PointMarker>
                    <seriesWithMetadata:AnnotatedPointMarker RenderPD="{Binding ElementName=lineSeries,Path=.}" Width="5" Height="7" GainMarkerFill="LimeGreen" LossMarkerFill="Red" Stroke="White" StrokeThickness="1"/>
                </s:FastLineRenderableSeries.PointMarker>

            </s:FastLineRenderableSeries>
            <s:FastLineRenderableSeries x:Name="FastLineSeries" />
        </s:SciChartSurface.RenderableSeries>

am I doing something wrong?

  • lorenzo522 asked 8 years ago
  • last active 8 years ago
0 votes
6k views

Hi, I am trying to make a graph using the mountain series and I have allocated some padding to the y axis using the growBy and have the series filled using areaStyle but the issue is the area bellow the padding doesn’t get filled and it looks weird where the graph looks half filled because of the padding. Is there a way to fill the area of the padding using the areaStyle or something similar ignoring the growBy padding.

0 votes
9k views

Hi, I’m overriding FastBubbleRenderableeSeries.InternalDraw. I recently upgraded to SciChart 4 and now some of my code throws a KeyNotFoundException.

The following code, inside InternalDraw(..), results in a KeyNotFoundException.

The contents of ZPoints at the time are 0.01, 0.01.

   var points = (XyzPointSeries)renderPassData.PointSeries;

                if (points.Count == 0)
                {
                    return;
                }

                var maxZ = (double)points.ZPoints.GetMaximum();    <---- exception thrown

Am I doing something wrong? How can I get the maximum Z value?

Cheers
Felix

  • F W asked 8 years ago
  • last active 8 years ago
0 votes
0 answers
3k views

I want to use the SeriesSelectionModifier to select a series when I click on the line between points.

Using the SeriesSelectionModifier, I can select a series by clicking the mouse on the point.

However, when I click on the line between points, the SeriesSelectionModifier does not work and I cannot select a series.

How can I select a series even if I click on the line between points?

0 votes
7k views

Hi,

How can I change the colour bar of column chart individually?
I need to create a non linear column chart and every bar should have their own colour that correspond to X values.

0 votes
6k views

I’m attempting to export a heatmap to .png using the SciChartSurface.ExportToFile() method. The problem is the corresponding HeatmapColorMap is not included in this exported image.

Is there a way to render the image and include the HeatmapColorMap as an overlay?

0 votes
3k views

How do I know when user edited the text on TextAnnoation so the app can save it?
How to do the same for https://www.scichart.com/questions/wpf/get-textannotation-text-after-user-editing for Android and iOS version of SciChart?

0 votes
8k views

I took your simple line chart quick start and am attempting to add a second series on a second Y axis. It works fine as long as both series are rendered on yAxis1 but as soon as I uncomment out the line chart1.YAxes.Add(yAxis2) I get a blank chart instead (doesn’t matter if lineSeries2.YAxis is set to yAxis1 or yAxis2 – same result). I can’t figure out what the problem is.

        var xAxis = new NumericAxis();
        chart1.XAxis = xAxis;

        var yAxis1 = new NumericAxis();
        yAxis1.AxisAlignment = AxisAlignment.Left;
        chart1.YAxes.Add(yAxis1);

        var yAxis2 = new NumericAxis();
        yAxis2.AxisAlignment = AxisAlignment.Right;
        //chart1.YAxes.Add(yAxis2);

        var series1 = new XyDataSeries<double, double>();
        series1.SeriesName = "Sinewave1";

        var series2 = new XyDataSeries<double, double>();
        series2.SeriesName = "Sinewave2";

        for (int i = 0; i < 1000; i++)
        {
            series1.Append(i, Math.Sin(2 * Math.PI * i / 1000));
            series2.Append(i, Math.Sin(2 * Math.PI * i / 500) * 2);
        }

        var lineSeries1 = new FastLineRenderableSeries();
        lineSeries1.DataSeries = series1;
        lineSeries1.YAxis = yAxis1;
        chart1.RenderableSeries.Add(lineSeries1);

        var lineSeries2 = new FastLineRenderableSeries();
        lineSeries2.DataSeries = series2;
        lineSeries2.YAxis = yAxis1;
        chart1.RenderableSeries.Add(lineSeries2);
0 votes
8k views

Hi!

It does compile, and run as expected, still I get the following error in xaml code.
When I delete the Vertical slice modifier the error disappears.

Have you got any idea what is causing this?

Kristóf

-2 votes
0 answers
5k views

I don’t find limit line
How can I implement limit line without using Fast Line series?

2 votes
14k views

Hi!

I would like to add a margin to the x-axis number so that they don’t stick on the axis anymore. See attached screenshot for detailed explanation.

Is that possible?

Best regards,
Joerg

0 votes
21k views

Hey super helpful and awesome SciCharts gurus,
I’m trying to create a graph that has usable data in a specific range, say 80-100, and I’m wondering if there is a way to lock the y axis range absolutely? This would override any kind of updating that ZoomPan or other modifiers might try to do.

Thanks!
Ryan

1 vote
2k views

The project is developed on SciChart JS.

The x axis is date time numeric and y axis is numeric.

There is a option for the user to select the x axis interval. The interval values are 5 Min, 10 Min, 15 Min, 30 Min, 1 Hour, 6 Hour, 12 Hour, Days, Weeks, Months & Years.

When the user the selects a interval in the select option, the x axis should be updated with the selected interval.

For Example, If the user selects the 5 Min in the select option, then the x axis interval should be 5 Min.

For 5 Min X Axis Interval

16-Jan-2023 07:00
16-Jan-2023 07:05
16-Jan-2023 07:10
16-Jan-2023 07:15
16-Jan-2023 07:20
16-Jan-2023 07:25
16-Jan-2023 07:30

For 1 Hour X Axis Interval

16-Jan-2023 07:00
16-Jan-2023 08:00
16-Jan-2023 09:00
16-Jan-2023 10:00
16-Jan-2023 11:00
16-Jan-2023 12:00
16-Jan-2023 13:00
16-Jan-2023 14:00

So let me know how to change the interval in the x axis (date time numeric) based on the selection.

I have attached the zip file which contains the HTML file.

  • Leo Leslin asked 1 year ago
  • last active 5 months ago
1 vote
3k views

Hi,

I am facing a issue with RolloverModifier. I have multiple charts in single window. For some points the lines over the chart are missing.

Please find the attached images for some examples and the code for reproduce the issue. on the attachment you can see that the line on some chart is missing when mouse on left and right corner area of the chart.

Posting again because on latest version also the same issue not resolved.
https://www.scichart.com/questions/js/rollovermodifier-in-multiple-chart-line-missing-on-some-areas

0 votes
6k views

Hi,

Please take a look at the attached screenshot first.

I have a chart configured to draw some data. I need to draw SCIAxisMarkerAnnotation on Y axis. And it seems that annotation has alignment by right side of axis area. Is there a possibility to change it to left side of axis area?

1 vote
6k views

Hello SciChart-Team!

I’m trying to export a graph from my application using the “ExportToFile”-method.
This is what my code looks

Chart.ExportToFile(@"C:\Users\miko\Desktop\export.xps", SciChart.Core.ExportType.Xps, false, new Size(2560, 1440));

When this is being called the following exception is being raised

Exception thrown: 'SciChart.Charting.Common.Helpers.ExportException' in SciChart.Charting.dll
Additional information: Exception occured during deserialization of the SeriesSelectionModifier type. The SelectedSeriesStyle property of the Style type cannot be processed. Please be advised that SciChart doesn't handle serialization of objects with propeties of interface type, collection type or custom type.You need to implement IXmlSerializible in such objects to have them handled properly. For more details, please check the InnerException.

This exception seems to be related to the SeriesSelectionModifier I have applied to my chart.

The modifier XAML:

<s:SeriesSelectionModifier
    x:Name="seriesSelection
    SelectedSeriesStyle="{StaticResource selectedSeriesStyle}"
    SelectionChanged="seriesSelection_SelectionChanged" />

The style XAML

<Style x:Key="selectedSeriesStyle" TargetType="{x:Type s:FastLineRenderableSeries}">
     <Setter Property="PointMarkerTemplate">
         <Setter.Value>
             <ControlTemplate>
                 <s:EllipsePointMarker
                 Width="6"
                 Height="6"
                 Fill="White"
                 Stroke="Black" />
            </ControlTemplate>
         </Setter.Value>
     </Setter>
 </Style>

When I remove the SeriesSelectionModifier from my XAML all works as expected.
What am I missing?

0 votes
10k views

Hello,

we are currently using SciChart 2D in our Application. I got the request to provide a 3D representation of one of our charts, so I started to download the newest Version of SciChart to get a trial on the 3D charts. I included the dll’s to our application and reworked the code to show a 3D chart instead. I think the code will work, but in our application I can’t see a chart. I just see a black rectangle (See attachement) with a text that 3D charts are only available in the 3D or SDK editions.

Can you help me?

Thanks,
Joerg

1 vote
0 answers
6k views

Hello.

In my project, I am trying to display four SciChartSurfaces with a single legend. Furthermore, I want the Visibility changes of each series in the legend checkbox to be reflected in all SciChartSurfaces.

The following code achieves this, but I am not confident that it is the best solution. Is there a more Smart way to accomplish this?

MainWindow.xaml

<Window x:Class="SurveyFleetVisionChartLegend.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:local="clr-namespace:SurveyFleetVisionChartLegend"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:s="http://schemas.abtsoftware.co.uk/scichart"
    Title="MainWindow"
    Width="800"
    Height="550"
    d:DataContext="{d:DesignInstance {x:Type local:MainWindowViewModel}}"
    mc:Ignorable="d">

<Window.DataContext>
    <local:MainWindowViewModel />
</Window.DataContext>
<Window.Resources>
    <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
</Window.Resources>
<Grid>
    <Grid.RowDefinitions>
        <RowDefinition />
        <RowDefinition />
        <RowDefinition />
        <RowDefinition />
        <RowDefinition Height="auto" />
    </Grid.RowDefinitions>

    <s:SciChartSurface Grid.Row="0"
                       Margin="5"
                       VerticalAlignment="Stretch"
                       Background="WhiteSmoke"
                       CacheMode="{x:Null}"
                       ChartTitle="SciChartSurface1"
                       RenderableSeries="{s:SeriesBinding GraphSeriess1.Value,
                                                          Mode=OneWay,
                                                          UpdateSourceTrigger=PropertyChanged}">

        <s:SciChartSurface.XAxis>
            <s:NumericAxis DrawLabels="False"
                           GrowBy="0.1, 0.1" />
        </s:SciChartSurface.XAxis>

        <s:SciChartSurface.YAxis>
            <s:NumericAxis HorizontalContentAlignment="Left"
                           DrawLabels="False"
                           GrowBy="0.1, 0.1" />
        </s:SciChartSurface.YAxis>
        <s:SciChartSurface.ChartModifier>
            <s:ModifierGroup>
                <s:LegendModifier x:Name="TrendChartLegendModifier"
                                  ShowLegend="False"
                                  Visibility="Visible" />
            </s:ModifierGroup>
        </s:SciChartSurface.ChartModifier>
    </s:SciChartSurface>
    <s:SciChartSurface Grid.Row="1"
                       Margin="5"
                       VerticalAlignment="Stretch"
                       Background="WhiteSmoke"
                       ChartTitle="SciChartSurface2"
                       RenderableSeries="{s:SeriesBinding GraphSeriess2.Value,
                                                          UpdateSourceTrigger=PropertyChanged}">

        <s:SciChartSurface.XAxis>
            <s:NumericAxis DrawLabels="False"
                           GrowBy="0.1, 0.1" />
        </s:SciChartSurface.XAxis>

        <s:SciChartSurface.YAxis>
            <s:NumericAxis HorizontalContentAlignment="Left"
                           DrawLabels="False"
                           GrowBy="0.1, 0.1" />
        </s:SciChartSurface.YAxis>
    </s:SciChartSurface>
    <s:SciChartSurface Grid.Row="2"
                       Margin="5"
                       VerticalAlignment="Stretch"
                       Background="WhiteSmoke"
                       ChartTitle="SciChartSurface3"
                       RenderableSeries="{s:SeriesBinding GraphSeriess3.Value}">

        <s:SciChartSurface.XAxis>
            <s:NumericAxis DrawLabels="False"
                           GrowBy="0.1, 0.1" />
        </s:SciChartSurface.XAxis>

        <s:SciChartSurface.YAxis>
            <s:NumericAxis HorizontalContentAlignment="Left"
                           DrawLabels="False"
                           GrowBy="0.1, 0.1" />
        </s:SciChartSurface.YAxis>
    </s:SciChartSurface>
    <s:SciChartSurface Grid.Row="3"
                       Margin="5"
                       VerticalAlignment="Stretch"
                       Background="WhiteSmoke"
                       ChartTitle="SciChartSurface4"
                       RenderableSeries="{s:SeriesBinding GraphSeriess4.Value}">

        <s:SciChartSurface.XAxis>
            <s:NumericAxis DrawLabels="False"
                           GrowBy="0.1, 0.1"
                           VisibleRangeLimitMode="MinMax" />
        </s:SciChartSurface.XAxis>

        <s:SciChartSurface.YAxis>
            <s:NumericAxis HorizontalContentAlignment="Left"
                           DrawLabels="False"
                           GrowBy="0.1, 0.1" />
        </s:SciChartSurface.YAxis>
    </s:SciChartSurface>

        <!--  Display the legend for Chart1.  -->
        <!--  Synchronization of Visiblity of each series of each SciChartSurface is performed on the ViwModel side.  -->
        <s:SciChartLegend Grid.Row="4"
                          Grid.Column="1"
                          HorizontalAlignment="Stretch"
                          HorizontalContentAlignment="Center"
                          LegendData="{Binding LegendData,
                                               ElementName=TrendChartLegendModifier}"
                          Orientation="Vertical"
                          ScrollViewer.VerticalScrollBarVisibility="Auto"
                          ShowVisibilityCheckboxes="True" />
    </Grid>
</Window>

MainWindowViewModel.cs

    using Reactive.Bindings;
using Reactive.Bindings.Extensions;
using SciChart.Charting.Common.Extensions;
using SciChart.Charting.Model.ChartData;
using SciChart.Charting.Model.ChartSeries;
using SciChart.Charting.Model.DataSeries;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Documents;
using System.Windows.Media;
using System.Xml.Linq;

namespace SurveyFleetVisionChartLegend
{
    public class MainWindowViewModel
    {
        public ReactivePropertySlim<List<IRenderableSeriesViewModel>> GraphSeriess1 { get; set; } = new ReactivePropertySlim<List<IRenderableSeriesViewModel>>();
        public ReactivePropertySlim<List<IRenderableSeriesViewModel>> GraphSeriess2 { get; set; } = new ReactivePropertySlim<List<IRenderableSeriesViewModel>>();
        public ReactivePropertySlim<List<IRenderableSeriesViewModel>> GraphSeriess3 { get; set; } = new ReactivePropertySlim<List<IRenderableSeriesViewModel>>();
        public ReactivePropertySlim<List<IRenderableSeriesViewModel>> GraphSeriess4 { get; set; } = new ReactivePropertySlim<List<IRenderableSeriesViewModel>>();

        public ReactiveCommand RecreateCommand { get; set; }

        private List<string> chartNames;
        private Dictionary<string, bool> seriesVisibles { get; set; }
        private Random random = new Random();

        public MainWindowViewModel()
        {
            chartNames = new List<string>() { "Chart1", "Chart2", "Chart3" };
            seriesVisibles = new Dictionary<string, bool>();
            chartNames.ForEach(a => seriesVisibles.Add(a, true));

            GraphSeriess1.Value = createGraphSeriess("Chart");
            GraphSeriess2.Value = createGraphSeriess("Chart");
            GraphSeriess3.Value = createGraphSeriess("Chart");
            GraphSeriess4.Value = createGraphSeriess("Chart");

            // If the legend changes the Visibility of each series in GraphSeriess1,
            // Vary the Visibility of each series in other GraphSeriess.
            GraphSeriess1.Subscribe(s=> {
                if(s != null)
                    s.ForEach(a =>
                    {
                        a.ObserveProperty(b => b.IsVisible).Subscribe(_ =>
                        {
                            if (GraphSeriess2.Value != null)
                                GraphSeriess2.Value.First(c => c.DataSeries.SeriesName == a.DataSeries.SeriesName).IsVisible = a.IsVisible;
                            if (GraphSeriess3.Value != null)
                                GraphSeriess3.Value.First(c => c.DataSeries.SeriesName == a.DataSeries.SeriesName).IsVisible = a.IsVisible;
                            if (GraphSeriess4.Value != null)
                                GraphSeriess4.Value.First(c => c.DataSeries.SeriesName == a.DataSeries.SeriesName).IsVisible = a.IsVisible;
                            seriesVisibles[a.DataSeries.SeriesName] = a.IsVisible;
                        });
                    });
            });
        }

        private List<IRenderableSeriesViewModel> createGraphSeriess(string name)
        {
            return chartNames.Select((x,a) => createGraphSeries(x, a)).ToList();
        }

        private IRenderableSeriesViewModel createGraphSeries(string name, int index)
        {
            var dataSeries = new XyDataSeries<double>() { SeriesName = name};

            for (var i = 0; i < 5; i++)
            {
                dataSeries.Append(i, random.Next(100));
            }

            return new LineRenderableSeriesViewModel()
            {
                DataSeries = dataSeries,
                IsVisible = seriesVisibles[dataSeries.SeriesName],
                Stroke = Color.FromRgb((byte)(index * 200), (byte)(index * 100), (byte)(index * 100))
            };
        }
    }
}

That is all. Best regards.

0 votes
4k views

Hello

I tried to create a TickProvider for DateTimeaxis followed by https://www.scichart.com/documentation/win/current/webframe.html#Axis%20Ticks%20-%20TickProvider%20and%20DeltaCalculator%20API.html .

My custom provider (CustomDateTimeTickProvider) exactly same that found in url above.

<s:SciChartSurface x:Name="sciChartrtr" 
      s:ThemeManager.Theme="Chrome"
      RenderableSeries="{s:SeriesBinding ChartSeries, UpdateSourceTrigger=PropertyChanged}">
         <s:SciChartSurface.Resources>
             <vm:CustomTickProvider  x:Key="CustomTickProvider"/>
         </s:SciChartSurface.Resources>

         <s:SciChartSurface.XAxis>
               <s:DateTimeAxis DrawMajorBands="True" TickProvider="{StaticResource CustomTickProvider}" AutoTicks="True"  TextFormatting="yyyy.MM.dd" AxisTitle="Idő"/>
          </s:SciChartSurface.XAxis>
          <s:SciChartSurface.YAxis>
                <s:NumericAxis AutoRange="Always" DrawMajorBands="True" AxisAlignment="Left" GrowBy="0.02, 0.02" AxisTitle="{Binding SecondYAxisTitle}"/>
           </s:SciChartSurface.YAxis>
           <!-- YAxis, RenderableSeries omitted for brevity -->
 </s:SciChartSurface>

But my xaxis is empty. What do I wrong?
Thank you very much

0 votes
12k views

Hi everyone,

i’m just looking for a polar chart that can plot 3D-Data like Heatmap Chart. Anyone has an idea about it?

0 votes
3k views

During migration from v3.1 to 6.5 I have noticed it no longer draws a border around the chart. How on earth do I add a border?
Applying a BorderBrush & BorderThickness to the ‘GridLinesPanel’ has no effect. Adding these to the SciChartSurface does produce a border, but it gets rendered on top of the series, obscuring values plotted along the very edge of the chart. I’ve attached an image showing what this looks like with and without a border (orange) applied to the SciChartSurface.

1 vote
0 answers
4k views

I’ve set the width value to matchParent. How do I remove this unwanted space on the right side of the chart?

0 votes
9k views

Hello.
I wanna deactivate the scichart on machine that doesn’t work because a reach activation limit.
How can i do this?

0 votes
7k views

I create a chart like the example Vertically Stacked Axes. I add many channel,the chart would draw outside the view. It can’t scroll down or up to see other channel.
I have use NumericAxis scrollbar,but it only XAxis can scroll. Is there any method to solve it?

0 votes
4k views

I have added a real time value legend to my chart. This is working well, based upon examples I have found here at the forum and in the SciChart documentation.

My question is this:
How can I position this new legend (includes series color, series name and series YValue ) so that it is in relation to a single or multiple Y axis’s displayed. In other words I like it to positions itself in relation to the YAxis so it does not overwrite it, and stays on the plotting area.

Appreciate the help
Thank you
Anders

1 vote
9k views

From what I’ve read into chrome’s roadmap, everything seems on track for a webgpu release in May.
Is scichart taking this into account and planning to add webgpu support?
I suspect this would make quite an impact on performance, so it would be a great addition.

Thanks!

1 vote
11k views

Hi

I want to show tooltips on point markers only.
I have FastMountainRenderableSeries with EllipsePointMarker. I don’t want to show tooltip on series, on PointMarker only so can’t use TooltipModifier.

I tried to add tooltip from XAML like this:

<sciChart:EllipsePointMarker sciChart:TooltipModifier.IncludeSeries="True">
    <sciChart:EllipsePointMarker.ToolTip>
        <ToolTip Padding="0">
            ...
        </ToolTip>
    </sciChart:EllipsePointMarker.ToolTip>
</sciChart:EllipsePointMarker>

But it is not showing.

Is it possible to achieve this?

0 votes
6k views

To give a user some control over the number of gridlines of a DateTimeAxis, I gave the user control over the “MaxAutoTicks”. Works well, except that not all possible MaxAutoTicks settings have an effect on the number of shown major gridlines.
Is there a way to get the number of gridlines ( or the delta ) actually being drawn on the chart? I want to filter out all “MaxAutoTicks” values that have no effect on the amount of grid lines drawn.

I thought about using the DeltaCalculator,with different MaxAutoTicks, to calculate the delta and use that to determine which MaxAutoTicks have an effect on the number of gridlines drawn. Unfortunate I did not see a way to do this without the need to override the DateTimeAxis class to get public access( or a binding) to GetDeltaCalculator.

  • _ _ asked 8 years ago
  • last active 8 years ago
1 vote
1k views

I’m trying to add rollover / tooltip to a chart, which uses sweeping. First, everything is working fine, but after updating the data over more then one page, the rollover is messing around with the data.

I created a codesandbox with the vitalsign demo: https://codesandbox.io/p/sandbox/javascript-vital-signs-ecg-medical-chart-example-forked-2zqcs3

First the rollover works great. Wait until the data is updated to the left side. Then you’ll see the messed up values and rollover points.

  • J Quader asked 3 months ago
  • last active 3 months ago
0 votes
4k views

I am still experiencing the effects of this defect despite using v2.5.0.2598 of the Android libraries. Can someone please explain to me how to circumvent this behavior? It seems silly to require a base series that is ultimately going to be replaced by real-time updates.

Cheers

  • TJ Cook asked 5 years ago
  • last active 5 years ago
0 votes
0 answers
845 views

java.lang.NullPointerException: Attempt to invoke virtual method ‘boolean android.view.GestureDetector.onTouchEvent(android.view.MotionEvent)’ on a null object reference
at com.scichart.charting.modifiers.GestureModifierBase.onTouch(SourceFile:80)
at com.scichart.core.utility.touch.MotionEventManager.c(SourceFile:140)
at com.scichart.core.utility.touch.MotionEventManager.a(SourceFile:39)
at com.scichart.core.utility.touch.MotionEventManager$a$1.a(SourceFile:224)
at com.scichart.core.utility.touch.MotionEventManager$a$1.execute(SourceFile:221)
at com.scichart.core.utility.touch.MotionEventManager$a.a(SourceFile:211)
at com.scichart.core.utility.touch.MotionEventManager$a.onTouchEvent(SourceFile:183)
at com.scichart.charting.visuals.SciChartSurface.onTouchEvent(SourceFile:1237)
at android.view.View.dispatchTouchEvent(View.java:12533)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3026)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2705)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3032)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2662)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3032)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2662)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3032)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2662)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3032)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2662)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3032)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2662)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3032)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2662)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3032)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2662)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3032)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2662)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3032)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2662)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3032)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2662)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3032)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2662)
at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:461)
at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1830)
at android.app.Activity.dispatchTouchEvent(Activity.java:3453)
at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:419)
at android.view.View.dispatchPointerEvent(View.java:12774)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:5263)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5063)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4578)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4631)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4597)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4737)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4605)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4794)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4578)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4631)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4597)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4605)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4578)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:7304)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:7273)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:7234)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:7410)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:247)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:326)
at android.os.Looper.loop(Looper.java:165)
at android.app.ActivityThread.main(ActivityThread.java:6806)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)

0 votes
4k views

I am developing PieChart with MVVM.
I would like to hide the details of the item. How can I do this?

0 votes
0 answers
40 views

when I try to add multiple 3d charts in XML files it crashes. Not sure it is possible at all to have multiple 3d charts being rendered in a single activity.

0 votes
8k views

It’s continuation of this question. I need to set text formatting in PriceLabelProvider for cursor label based on current step between nearest labels numbers. In my screenshot it would be 0.50. How can I get step between nearest labels numbers from code?

enter image description here

  • RTrade A asked 9 years ago
  • last active 9 years ago
0 votes
10k views

We have Scichart 2.32 version software. In this version, we are using DateTimeAxis format on XAxis. We are showing XAxis Labels in this Text Formatting as “yyyy-MM-dd HH:mm:ss”.
But now, we need to changing the TextFormatting of XLabels.
We need to show time representation of XLabels in Minutes format. We need to show only minute representation during the Time span in the live chart.

How can we achieve this TextFormatting in 2.32 version software? If not, can we achieve this Formatting in the newer versions?

  • gamze asked 5 years ago
  • last active 5 years ago
0 votes
10k views

Hello,

I want to use user’s settings in my application. I’ve created my own window for settings with checkboxes and colorpickers.

I’ve binded my series with settings like that

 <s:SciChartSurface.RenderableSeries>
            <s:FastLineRenderableSeries x:Name="tLineSeries1" StrokeDashArray="7 4" StrokeThickness="3" YAxisId="RightAxis" >
                <s:FastLineRenderableSeries.IsVisible>
                    <Binding Source="{x:Static ProjectProperties:Settings.Default}" Path="Visibility1" />
                </s:FastLineRenderableSeries.IsVisible>
                <s:FastLineRenderableSeries.SeriesColor>
                    <Binding Source="{x:Static ProjectProperties:Settings.Default}" Path="Color1" />
                </s:FastLineRenderableSeries.SeriesColor>
            </s:FastLineRenderableSeries>

Everything is working fine and after restarting the application i get the colors and visibility of series as i want.

The problems starts after turning on ShowVisibilityCheckboxes=”true” in LegendModifier. After that, my settings dont work at all. Is there any way how can i bind checkboxes from the legends with my own created checkboxes or settings? In other words, how can i make them both to work “together”?

0 votes
7k views

I have issue with legend on high resolutions screens. Checkboxes and text is very small and hard to read. I couldn’t find any solution to change text size or provide my own template with text size for legend in Android SciChart.

I want to change legend text size depends on screen like it is in Android by declaring size in dimens.xml.

I do that for Axis labels but I don’t know how do the same for text in legend.

Does anyone know how to achieve this?

  • Marcin K asked 6 years ago
  • last active 6 years ago
0 votes
5k views

hi,
Does RubberBandXyZoomModifier have inbuilt provision to set zoom direction in Y axis only?

I am using the solution in below link, but it is causing interaction problems with other modifiers.

https://www.scichart.com/questions/question/rubberbandxyzoommodifier-zoom-in-y-axis-only/#post-5270

Thanks,
Vibin

0 votes
17k views

Can you please provide some examples of how to alter the formatting of a DateTimeAxis axis. I’d like to show the date and the time component that also supports localization based on the user regional settings.

0 votes
10k views

Hello.
Using SciChart v2.2.
BaseRenderableSeries.HitTest(MousePoint) triggers not only in series pane, but also in other panes.

My hit-test code is below, called from public override void OnModifierMouseMove(ModifierMouseArgs mouseEventArgs)

foreach (var renderSeries in ParentSurface.RenderableSeries)
            {
                var series = renderSeries as BaseRenderableSeries;
                bool isCandleSeries = ((series as FastCandlestickRenderableSeries) != null);

                if (series != null && series.DataSeries != null)
                {
                    var hitTest = series.HitTest(mouseEventArgs.MousePoint);

                    if (hitTest.DataSeriesType == DataSeriesType.Ohlc)
                    {
                        seriesAnnotaion[k].X1 = hitTest.DataSeriesIndex;
                        seriesAnnotaion[k].Y1 = hitTest.CloseValue;

                        if (hitTest.IsHit)
                        {
                            //show tooltip
                        }
                     }
                  }
               }
1 vote
9k views

I want to change the color of the fill bellow the chart(with blue using line chart,FastMountainRenderableSeries etc) but I have problem with defining the BrushStyle and it wont apply on chart(issue with color define-initPaint).Should I change the function ?or how to change default area color ?

  • Guest asked 8 years ago
  • last active 8 years ago
0 votes
2k views

@TypeScriptError Getting an 800A0404 error when opening any javascript file. This is happening in the Windows Script Host panel. Telling me that I have bad code, that’s not bad. This has been happening since upgrading my Java Version.

0 votes
12k views

I’m using a rollover tooltip to display series info.
Tooltips are shown in the same order data points are hit, so it changes while i would like to fix it so the user always see the series in the same position throughout the chart.

Thank you

Showing 1 - 50 of 4k results

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies