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!

Answered
1
0

Hi,
in my application I’m recording values. All parameters are shown in a GridView Control. Now I want to show the RolloverModifier Values in this GridView.
Therefore I make a binding to the SeriesData property to my ViewModel:

     
            
                
            

            
                
                    
                    
                    
                    
                
            
        

In my ChartModel I have the property:

    private ChartDataObject _seriesData;

        public ChartDataObject SeriesData
        {
            get { return _seriesData; }
            set
            {
                _seriesData = value; 
            }
        }

When application starts the property will be set to null. And when I load some values into the graph and move over the RolloverModifier I got an Nullreference exception stacktrace is in the txt file.

Regards Markus

Attachments
  • You must to post comments
Best Answer
1
0

Hi,
solved it by myself. I make a TwoWay Binding and initialized the property with:

    private ChartDataObject _seriesData = new ChartDataObject(new ObservableCollection());

        public ChartDataObject SeriesData
        {
            get { return _seriesData; }
            set
            {
                _seriesData = value; 
            }
        }

Then when I move the cursor the SeriesInfos inside the SeriesData are refreshed but there is no notification at the property itself.

Regards Markus

  • Andrew
    Aha, great find. This is probably related to the Dependency Property Precedence issue we see pop up all over the place. http://msdn.microsoft.com/en-us/library/ms743230(v=vs.110).aspx Somewhere in our code we are probably setting a DP in code which means bindings don't work as expected. TwoWay binding often resolves this issue as our setting of a property in code gets pushed to the ViewModel.
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.