This question is locked. New answers and comments are not allowed.
Hello,
I've moved from RadChart to RadSparkLine btw the first time the RadTimeBar shows it's not in the correct scale..
I have to show on the X a datetime and on the Y a double... In the timebar I have DateStart and a DateEnd, but the data are not to start at DataStart...
Consider this scenario
DateStart = 8:00 AM
DateEnd = 11:00 PM
Data starts from 9:00 ... the first time the timebar shows I've the RadSparkLine scale that strech on whole RadTimeBar.. when I change the selected item (from a radgridview) then return back, the data are correcly sized...
Here's my XAML
What can I check? with RadChart it was ok...
Thanks
I've moved from RadChart to RadSparkLine btw the first time the RadTimeBar shows it's not in the correct scale..
I have to show on the X a datetime and on the Y a double... In the timebar I have DateStart and a DateEnd, but the data are not to start at DataStart...
Consider this scenario
DateStart = 8:00 AM
DateEnd = 11:00 PM
Data starts from 9:00 ... the first time the timebar shows I've the RadSparkLine scale that strech on whole RadTimeBar.. when I change the selected item (from a radgridview) then return back, the data are correcly sized...
Here's my XAML
<
UserControl.Resources
>
<
ResourceDictionary
>
<
conv:DateTimeToOADateConverter
x:Key
=
"DateTimeToOADateConverter"
></
conv:DateTimeToOADateConverter
>
<
conv:DateConverterTimeBar
x:Key
=
"t1"
></
conv:DateConverterTimeBar
>
</
ResourceDictionary
>
<
DataTemplate
x:Key
=
"test123"
>
<
TextBlock
Text
=
"TooltipExaple"
></
TextBlock
>
</
DataTemplate
>
</
UserControl.Resources
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"*"
></
RowDefinition
>
</
Grid.RowDefinitions
>
<
telerik:RadTimeBar
Name
=
"timeBar1"
Grid.Row
=
"0"
Width
=
"1200"
Background
=
"{x:Null}"
PeriodStart
=
"{Binding DashBoard.SelectedDataItem.DataRiferimentoStart,Mode=TwoWay,Converter={StaticResource t1}}"
PeriodEnd
=
"{Binding DashBoard.SelectedDataItem.DataRiferimentoEnd,Mode=TwoWay,Converter={StaticResource t1},ConverterParameter=next_day}"
VisiblePeriodStart
=
"{Binding DashBoard.SelectedDataItem.FirstTS,Mode=TwoWay,Converter={StaticResource t1}}"
VisiblePeriodEnd
=
"{Binding DashBoard.SelectedDataItem.LastTS,Mode=TwoWay,Converter={StaticResource t1},ConverterParameter=next_day}"
SelectionStart
=
"{Binding DashBoard.SelectionDateStart,Mode=OneWay}"
SelectionEnd
=
"{Binding DashBoard.SelectionDateEnd,Mode=OneWay}"
SelectionTitleFormatString
=
"{}{0:HH:mm:ss} - {1:HH:mm:ss}"
BorderBrush
=
"{x:Null}"
BorderThickness
=
"0"
Foreground
=
"{StaticResource text}"
FontFamily
=
"{Binding Source={StaticResource paletteManager}, Path=Palette.font,Mode=TwoWay}"
>
<
telerik:RadTimeBar.Intervals
>
<
telerik:DayInterval
></
telerik:DayInterval
>
<
telerik:HourInterval
IntervalSpans
=
"1"
/>
<
telerik:MinuteInterval
IntervalSpans
=
"1,5,10,15,30"
/>
<
telerik:SecondInterval
IntervalSpans
=
"10,15,30,60"
/>
</
telerik:RadTimeBar.Intervals
>
<
telerik:RadLinearSparkline
AutoRange
=
"True"
LineStroke
=
"{StaticResource AccentBrush}"
MinXValue
=
"{Binding DashBoard.SelectedDataItem.DataRiferimentoStart,Mode=OneWay,Converter={StaticResource DateTimeToOADateConverter}}"
MaxXValue
=
"{Binding DashBoard.SelectedDataItem.DataRiferimentoEnd,Mode=OneWay,Converter={StaticResource DateTimeToOADateConverter}}"
ItemsSource
=
"{Binding DashBoard.SelectedDataItem.SNAPSHOTs,Mode=TwoWay}"
XValuePath
=
"DT_TS"
YValuePath
=
"VALORE"
EmptyPointBehavior
=
"ShowAsZero"
>
</
telerik:RadLinearSparkline
>
<!--<
telerik:RadCartesianChart
x:Name
=
"RadChart1"
Grid.Row
=
"1"
Margin
=
"10,0,0,10"
>
<
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:DateTimeCategoricalAxis
LabelFormat
=
"HH:mm\h"
LabelInterval
=
"2"
PlotMode
=
"OnTicksPadded"
>
</
telerik:DateTimeCategoricalAxis
>
</
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:LinearAxis
MajorStep
=
"20"
/>
</
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:LineSeries
CategoryBinding
=
"DT_TS"
ValueBinding
=
"VALORE"
ItemsSource
=
"{Binding DashBoard.SelectedDataItem.SNAPSHOTs,Mode=TwoWay}"
/>
</
telerik:RadCartesianChart
>-->
</
telerik:RadTimeBar
>
What can I check? with RadChart it was ok...
Thanks