<Window x:Class="WpfChartExample.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:local="clr-namespace:WpfChartExample"
        mc:Ignorable="d"
        Title="MainWindow">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="50"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
            <RowDefinition Height="50"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.Resources>
            <Style TargetType="telerik:StepLineSeries" >
                <Setter Property="TrackBallInfoTemplate">
                    <Setter.Value>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal">
                                <TextBlock Text="{Binding Series.DisplayName, StringFormat=' {0}: '}" Margin="0,0,3,0"/>
                                <TextBlock Text="{Binding DataPoint.Value, StringFormat=0.00 }" FontWeight="Bold" Margin="0,0,5,0"/>
                                <TextBlock Text="{Binding DataPoint.Category, StringFormat={}{0:dd.MM HH:mm:ss}}" />
                            </StackPanel>
                        </DataTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Style TargetType="telerik:RangeSeries" >
                <Setter Property="TrackBallInfoTemplate">
                    <Setter.Value>
                        <DataTemplate >
                            <StackPanel Margin="3" Orientation="Horizontal">
                                <TextBlock Text="{Binding Series.DisplayName, StringFormat=' {0}: '}" Margin="0,0,3,0"/>
                                <TextBlock Text="{Binding DataPoint.Low, StringFormat=0.00 }" FontWeight="Bold" Margin="0,0,5,0"/>
                                <TextBlock Text="{Binding DataPoint.High, StringFormat=0.00 }" FontWeight="Bold" Margin="0,0,5,0"/>
                                <TextBlock Text="{Binding DataPoint.Category, StringFormat={}{0:dd.MM HH:mm:ss}}" />
                            </StackPanel>
                        </DataTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </Grid.Resources>
        
        <TextBlock Grid.Row="0" Text="Doesn't Work" FontSize="25"></TextBlock>
        <telerik:RadCartesianChart Grid.Row="1">
            <telerik:RadCartesianChart.Resources>
            </telerik:RadCartesianChart.Resources>
            <telerik:RadCartesianChart.Behaviors>
                <telerik:ChartPanAndZoomBehavior/>
                <telerik:ChartTrackBallBehavior SnapMode="AllClosePoints"/>
            </telerik:RadCartesianChart.Behaviors>
            <telerik:RadCartesianChart.Series>
                <telerik:StepLineSeries DisplayName="Value" Stroke="DodgerBlue" StrokeThickness="1" ItemsSource="{Binding Data}" CategoryBinding="Timestmp" ValueBinding="Value"></telerik:StepLineSeries>
                <telerik:RangeSeries DisplayName="Range" Stroke="#88FF0000" StrokeThickness="1" Fill="#44FF0000" ItemsSource="{Binding Data}" CategoryBinding="Timestmp" LowBinding="ValueLow" HighBinding="ValueHigh"></telerik:RangeSeries>
            </telerik:RadCartesianChart.Series>
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:DateTimeContinuousAxis PlotMode="OnTicks" MajorStepUnit="Minute" MajorStep="30" LabelFitMode="None">
                </telerik:DateTimeContinuousAxis>
            </telerik:RadCartesianChart.HorizontalAxis>
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis></telerik:LinearAxis>
            </telerik:RadCartesianChart.VerticalAxis>
            <telerik:RadCartesianChart.Grid>
                <telerik:CartesianChartGrid />
            </telerik:RadCartesianChart.Grid>
        </telerik:RadCartesianChart>

        <TextBlock Grid.Row="2" Text="Works" FontSize="25"></TextBlock>
        <telerik:RadCartesianChart Grid.Row="3">
            <telerik:RadCartesianChart.Resources>
            </telerik:RadCartesianChart.Resources>
            <telerik:RadCartesianChart.Behaviors>
                <telerik:ChartPanAndZoomBehavior/>
                <telerik:ChartTrackBallBehavior SnapMode="AllClosePoints"/>
            </telerik:RadCartesianChart.Behaviors>
            <telerik:RadCartesianChart.Series>
                <telerik:StepLineSeries DisplayName="Value" Stroke="DodgerBlue" StrokeThickness="1" ItemsSource="{Binding Data}" CategoryBinding="Timestmp" ValueBinding="Value"></telerik:StepLineSeries>
                <telerik:StepLineSeries DisplayName="Range" Stroke="#88FF0000" StrokeThickness="1" ItemsSource="{Binding Data}" CategoryBinding="Timestmp" ValueBinding="ValueLow" ></telerik:StepLineSeries>
                <telerik:StepLineSeries DisplayName="Range" Stroke="#88FF0000" StrokeThickness="1" ItemsSource="{Binding Data}" CategoryBinding="Timestmp" ValueBinding="ValueHigh"></telerik:StepLineSeries>
            </telerik:RadCartesianChart.Series>
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:DateTimeContinuousAxis PlotMode="OnTicks" MajorStepUnit="Minute" MajorStep="30" LabelFitMode="None">
                </telerik:DateTimeContinuousAxis>
            </telerik:RadCartesianChart.HorizontalAxis>
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis></telerik:LinearAxis>
            </telerik:RadCartesianChart.VerticalAxis>
            <telerik:RadCartesianChart.Grid>
                <telerik:CartesianChartGrid />
            </telerik:RadCartesianChart.Grid>
        </telerik:RadCartesianChart>
    </Grid>
</Window>
