This is a migrated thread and some comments may be shown as answers.

Not able to bind for telerikCharting:DataPoint YValue

1 Answer 76 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Anupam
Top achievements
Rank 1
Anupam asked on 09 Sep 2011, 05:52 PM

I am unable to bind the data for Y value , when i am trying to bind it from View model.

My View:

 <telerikCharting:DataSeries LegendLabel="Offical">
                           <telerikCharting:DataSeries.Definition>
                               <telerikCharting:SplineSeriesDefinition >
                               </telerikCharting:SplineSeriesDefinition>
                           </telerikCharting:DataSeries.Definition>

                                            <telerikCharting:DataPoint YValue="{Binding AxisXMinValue,Mode=TwoWay}" XCategory="Min"/>
                                            <telerikCharting:DataPoint YValue="{Binding AxisXMidValue,Mode=TwoWay}" XCategory="Mid"/>
                                            <telerikCharting:DataPoint YValue="{Binding AxisXMaxValue,Mode=TwoWay}" XCategory="Max"/>
                         
                     
                       </telerikCharting:DataSeries>

View Model:
 private decimal _axisXMaxValue;
        public decimal AxisXMaxValue
        {
            get { return this._axisXMaxValue; }
            set
            {
                this._axisXMaxValue = value;
                OnPropertyChanged("AxisXMaxValue");
            }
        }
        private decimal _axisXMidValue;
        public decimal AxisXMidValue
        {
            get { return this._axisXMidValue; }
            set
            {
                this._axisXMidValue = value;
                OnPropertyChanged("AxisXMidValue");
            }
        }
        private decimal _axisXMinValue;
        public decimal AxisXMinValue
        {
            get { return this._axisXMinValue; }
            set
            {
                this._axisXMinValue = value;
                OnPropertyChanged("AxisXMinValue");
            }
        }

1 Answer, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 14 Sep 2011, 04:05 PM
Hello Anupam,

The DataPoints in RadChart are not designed for such binding/updates. You can databind the chart to an observable collection and let the control create the DataPoints for you. You can find more details in the corresponding help topics:

Best regards,
Ves
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Chart
Asked by
Anupam
Top achievements
Rank 1
Answers by
Ves
Telerik team
Share this question
or