This question is locked. New answers and comments are not allowed.
Hi Guys,
i'm binding the LogarithmBase and the isLogarithm on the Axis Y
Everything looks okay, but i need to change this option at runtime by the help of a checkbox for enable / disable the log and a combobox for changing the base.
At runtime changing the base or the isLog option doesn't refresh update the chart as it suppose to be.
i found that changing the value of the isInverse refresh correctly the chart, so as a workaround i just set IsInverse twice to the inverse of himself ( so the value remain the same but looks change)
I'm okay with this workaround but that would be aweseome if it could works without that !!
here's my code, that may help you
Thanks,
Damien
And the XAML As Well ..
i'm binding the LogarithmBase and the isLogarithm on the Axis Y
Everything looks okay, but i need to change this option at runtime by the help of a checkbox for enable / disable the log and a combobox for changing the base.
At runtime changing the base or the isLog option doesn't refresh update the chart as it suppose to be.
i found that changing the value of the isInverse refresh correctly the chart, so as a workaround i just set IsInverse twice to the inverse of himself ( so the value remain the same but looks change)
I'm okay with this workaround but that would be aweseome if it could works without that !!
here's my code, that may help you
Thanks,
Damien
''' <summary> ''' Get or set a boolean indicating if the YAxis is log or not ''' </summary> ''' <value></value> ''' <returns></returns> ''' <remarks></remarks> Public Property YAxisIsLogarithmic() As Boolean Get Return _YAxisIsLogarithmic End Get Set(ByVal value As Boolean) If Not Boolean.Equals(_YAxisIsLogarithmic, value) Then _YAxisIsLogarithmic = value Properties.SetElementValue("YAxisIsLogarithmic", value.ToString()) RaisePropertyChanged("YAxisIsLogarithmic") ' Work around for log bug we need to change the value of the inverse and then put the value back YAxisIsInverse = Not YAxisIsInverse YAxisIsInverse = Not YAxisIsInverse End If End Set End Property ''' <summary> ''' Get or set the log base for YAxis ''' </summary> ''' <value></value> ''' <returns></returns> ''' <remarks></remarks> Public Property YAxisLogarithmBase() As Integer Get Return _YAxisLogarithmBase End Get Set(ByVal value As Integer) If Not Integer.Equals(_YAxisLogarithmBase, value) Then _YAxisLogarithmBase = value Properties.SetElementValue("YAxisLogarithmBase", value.ToString()) RaisePropertyChanged("YAxisLogarithmBase") ' Work around for log bug we need to change the value of the inverse and then put the value back YAxisIsInverse = Not YAxisIsInverse YAxisIsInverse = Not YAxisIsInverse End If End Set End Property''' <summary> ''' Get or set a boolean value indicating if the Axis is inverse or not ''' </summary> ''' <value></value> ''' <returns></returns> ''' <remarks></remarks> Public Property YAxisIsInverse() As Boolean Get Return _YAxisIsInverse End Get Set(ByVal value As Boolean) If Not Boolean.Equals(_YAxisIsInverse, value) Then _YAxisIsInverse = value Properties.SetElementValue("YAxisIsInverse", value.ToString()) RaisePropertyChanged("YAxisIsInverse") End If End Set End PropertyAnd the XAML As Well ..
<!-- Y Axis --> <telerik:ChartArea.AxisY> <telerik:AxisY Title="{Binding YAxisTitle}" IsInverse="{Binding YAxisIsInverse}" AutoRange="{Binding YAxisIsAutoRange}" IsZeroBased="{Binding YAxisIsZeroBased}" IsLogarithmic="{Binding YAxisIsLogarithmic}" LogarithmBase="{Binding YAxisLogarithmBase}" MinValue="{Binding YAxisMinValue}" MaxValue="{Binding YAxisMaxValue}" Step="{Binding YAxisStep}" AxisLabelsVisibility="{Binding YAxisLabelsVisible, Converter={StaticResource BooleanToVisibilityConverter}}" LabelRotationAngle="{Binding YAxisLabelsRotation}" MinorGridLinesVisibility="{Binding YAxisMinorGridLinesVisible, Converter={StaticResource BooleanToVisibilityConverter}}" MajorGridLinesVisibility="{Binding YAxisMajorGridLinesVisible, Converter={StaticResource BooleanToVisibilityConverter}}" StripLinesVisibility="{Binding YAxisStripLinesVisible, Converter={StaticResource BooleanToVisibilityConverter}}" DefaultLabelFormat="{Binding YAxisLabelsFormat}"/> </telerik:ChartArea.AxisY>