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!

1 vote
0 answers
34 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
275 views

We are getting a NullReferenceException at OnRenderSurfaceBaseLoaded(Object sender, RoutedEventArgs e) in Direct3D10RenderSurface.

On calling:

if (Direct3D10CompatibilityHelper.SupportsDirectX10)
        {
            // quickest one and optically on par with high quality or xaml rendering
            return new Direct3D10RenderSurface();
        }

System:
Windows 8: Version 6.2.9200.0
CLR version: 4.0.30319.42000

see Stacktrace:


Stack trace

System.NullReferenceException: Object reference not set to an instance of an object.
----------------------------------------------------------------------
at SciChart.Drawing.DirectX.Context.D3D10.Direct3D10RenderSurface.OnRenderSurfaceBaseLoaded(Object sender, RoutedEventArgs e): 
----------------------------------------------------------------------
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised): 
----------------------------------------------------------------------
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args): 
----------------------------------------------------------------------
at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent): 
----------------------------------------------------------------------
at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root): 
----------------------------------------------------------------------
at MS.Internal.LoadedOrUnloadedOperation.DoWork(): 
----------------------------------------------------------------------
at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks(): 
----------------------------------------------------------------------
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks(): 
----------------------------------------------------------------------
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget): 
----------------------------------------------------------------------
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget): 
----------------------------------------------------------------------
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs): 
----------------------------------------------------------------------
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler): 

Any help?

  • joerg asked 7 months ago
  • last active 7 months ago
0 votes
621 views

I’m currently trying to adapt an example to post here as an example repro– But in the meantime I figured I’d post and see if there are any fundamental problems with trying to do this.

The exception message states:

Additional information: Cannot get data-value from coordinate as the associated Axis is null
0 votes
729 views

Here’s the situation:
Our app has a viewmodel with an XyDataSeries Property bound to the plot. We’ve overridden DataPointSelectionModifer to allow us to trigger calculations when the selected points are changed. This overridden modifier is not instantiated by nor is it directly aware of the viewmodel; it is referenced only in the view xaml.

When changing between datasets we replace the contents of the XyDataSeries Property. Afterwards we are experiencing NullReferenceExceptions in DataPointSelectionModifier.SelectManyPoints(). This occurs whether we replace the contents of the data series or we set a completely new XyDataSeries object into the property.

It appears that the DataPointSelectionModifier.SelectedPointMarkers collection is no longer properly synced to the plot’s XyDataSeries. The size of the the collections are different and with the original DataSeries being garbage-collected the DataPointInfo.DataPointMetadata references are null. So we attempt to dial in a new selection and the deselection of this orphaned null metadata raises exceptions.

Is there some secret-sauce to keeping these collections in line?
Any and all suggestions are greatly appreciated.

0 votes
1k views

Hi!

I have the following code for a vertical slice modifier

    <s:VerticalSliceModifier Name="sliceModifier"
                                             ReceiveHandledEvents="True"
                                             >
                        <s:VerticalSliceModifier.VerticalLines>
                            <s:VerticalLineAnnotation Style="{StaticResource sliceStyle}"
                                                      X1="{Binding ParentViewModel.SliceModifierPosition, Mode=TwoWay}" />
                        </s:VerticalSliceModifier.VerticalLines>

 </s:VerticalSliceModifier>

This results in a nullreference exception. When I remove the VerticalLines, there is no nullreference exception, also no vertical lines.
As far as I can see ParentViewModel.SliceModifierPosition, does not have a value at the time.

I tried setting the visibility of the slicemodifier to collapsed, but it did not help the exception. Is there any to remove the slicemodifier for the time when X1 is not valid (using MVVM and not binding the slicemodifier itself)?

nullreference exception location
Abt.Controls.SciChart.ChartModifiers.VerticalSliceModifier.TB()
: Abt.Controls.SciChart.ChartModifiers.VerticalSliceModifier.OnAttached()
: Abt.Controls.SciChart.ChartModifiers.ModifierGroup.TB(IChartModifier C)
: Abt.Controls.SciChart.Common.Extensions.EnumerableExtensions. <a href="IEnumerable1 , Action1″>
: Abt.Controls.SciChart.ChartModifiers.ModifierGroup.TB(IEnumerable`1 C)
0 votes
0 answers
2k views

Hello again!
I’m working with new scichart version (5th august). In view XAML file I have this code snippet:

visuals:SciChartSurface Annotations="{Binding AnnotationCollection}"  SeriesSource="{Binding GraphicsCollection}" XAxis="{Binding XAxis, Mode=TwoWay}" YAxes="{Binding YAxisCollection}"  >

When I try to run the application, I get this NullReferenceException:

   в A. .Convert(Object value, Type targetType, Object parameter, CultureInfo culture)
   в System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
   в System.Windows.Data.BindingExpression.Activate(Object item)
   в System.Windows.Data.BindingExpression.AttachToContext(AttachAttempt attempt)
   в System.Windows.Data.BindingExpression.AttachOverride(DependencyObject target, DependencyProperty dp)
   в System.Windows.Data.BindingExpressionBase.OnAttach(DependencyObject d, DependencyProperty dp)
   в System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   в System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   в System.Windows.Data.BindingOperations.SetBinding(DependencyObject target, DependencyProperty dp, BindingBase binding)
   в System.Windows.FrameworkElement.SetBinding(DependencyProperty dp, BindingBase binding)
   в Abt.Controls.SciChart.Visuals.Annotations.LineAnnotationWithLabelsBase.VB()
   в Abt.Controls.SciChart.Visuals.Annotations.LineAnnotationWithLabelsBase.TB()
   в Abt.Controls.SciChart.Visuals.Annotations.LineAnnotationWithLabelsBase.OnXAxesCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
   в Abt.Controls.SciChart.Visuals.Annotations.AnnotationBase.Abt.Controls.SciChart.Visuals.Annotations.IAnnotation.OnXAxesCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
   в Abt.Controls.SciChart.Visuals.Annotations.AnnotationCollection.OnXAxesCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
   в Abt.Controls.SciChart.Visuals.SciChartSurface.OnXAxesCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
   в System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)

But if I change my xaml file this way:

visuals:SciChartSurface SeriesSource="{Binding GraphicsCollection}" XAxis="{Binding XAxis, Mode=TwoWay}" YAxes="{Binding YAxisCollection}" 
Annotations="{Binding AnnotationCollection}"   >

there won’t be any exceptions. I’ve attached project with exception below.

P.S. in the previuous version it works fine.

  • Egor asked 3 years ago
0 votes
3k views

Hello, SciChart team, i’m trying to implement vertical slices on my chart surface, but X axis is a DateTimeAxis, but i’m getting nullReferenceException when trying to move (just click on it).

“System.NullReferenceException occurred
_HResult=-2147467261
_message=Ссылка на объект не указывает на экземпляр объекта.
HResult=-2147467261
IsTransient=false
Message=Ссылка на объект не указывает на экземпляр объекта.
Source=Abt.Controls.SciChart.Wpf
StackTrace:
в Abt.Controls.SciChart.Visuals.Annotations.AnnotationBase.GetBasePoints()
InnerException: “

trying to solve this problem i downloaded scischart 3.42 but this didn’t help, it even made things worse underlining my scichartsurface declaration in .xaml file saying “2 is not a valid value for property orintation”
which is not used, and this chart worked before upgrade.
please help me out,
Volkov Alexander

Update: full rebuilding solved the latter problem. i’m adding zip containing txt with scichartsurface definition and methods from .cs which add and remove slices

Showing 7 results
This template supports the sidebar's widgets. Add one or use Full Width layout.