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

Get Y Axis Range Min and Max value

1 Answer 126 Views
Sparkline
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 17 Jul 2020, 07:55 PM

When the RadLinearSparline is in AutoRange, is there a way to get the actual Y Axis Min Range and Max Range values? These values would then be displayed in a separate control.   I have bound the MinYValue and MaxYValue to properties and am able to get the values when AutoRange = false but when AutoRange = true the MinYValue and MaxY are always 0.

<telerik:RadLinearSparkline  Grid.Row="0" Grid.RowSpan="3" Grid.Column="1"
                                       ItemsSource="{Binding AsyncData, Converter={StaticResource collectionConverter}}"
                                                                
                                       YValuePath="YVal"
                                       LineStroke="{Binding FontColor}"
                                       ShowNormalRange="True"
                                       AutoRange="{Binding AutoRange}"
                                       MinYValue="{Binding MinYvalue}"
                                       MaxYValue="{Binding MaxYvalue}"
                                       NormalRangeTop="{Binding Maximum}"
                                       NormalRangeBottom="{Binding Minimum}"
                                       EmptyPointBehavior="DropPoint"
                                                                >

 

 

1 Answer, 1 is accepted

Sort by
0
Vladimir Stoyanov
Telerik team
answered on 22 Jul 2020, 08:44 AM

Hello Steve,

Thank you for the shared code snippet. 

The MinYValue and MaxYValue properties are intended to specify the range manually when the AutoRange is False. When the AutoRange is True, you can go through the ItemsSource of the RadLinearSparkline and calculate the min and max Y values. 

I hope you find this information helpful.

Regards,
Vladimir Stoyanov
Progress Telerik

Tags
Sparkline
Asked by
Steve
Top achievements
Rank 1
Answers by
Vladimir Stoyanov
Telerik team
Share this question
or