Hey,
is it possible to change just the font of the grouped rows? The default and cell fonts should not be changed.I want
to change the font to consolas (mono space font).
Hi,
I need to create new custom indicator for candlestick chart (VWAP & Pivots). I found explanation here (http://docs.telerik.com/devtools/winforms/chartview/series-types/indicators/custom-indicators), but I can't compile the code.
public class DisparityIndexIndicator: ExponentialMovingAverageIndicator
{
public override double GetProcessedValue(int currentIndex){
double close = (this.DataPoints[currentIndex] as IndicatorValueDataPoint).BaseValue;double ema = base.GetProcessedValue(currentIndex);double result = ((close - ema) / ema) * 100;return result;}}
Hi,
After 9h 15min of trying to change the color of a f**king selected Tab of a Radpane I finally give up an post this thread.
I have created a copy of RadPane Control and Placed it in a style. Changed and added Values. Commented things out. And allways the same result.
Here is my code:
<Style TargetType="telerik:RadPane" BasedOn="{StaticResource RadPaneStyle}">
<Setter Property="Background" Value="#121212"/>
<Setter Property="Foreground" Value="#808080"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Grid x:Name="wrapper" Margin="0,0,0,-2" Background="Purple">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Disabled">
<Storyboard>
<DoubleAnimation To="0.2" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="HeaderElement"/>
</Storyboard>
</VisualState>
<VisualState x:Name="Normal"/>
<VisualState x:Name="MouseOver">
<Storyboard>
<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MouseOverVisual"/>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="PinnedVisual">
<DiscreteObjectKeyFrame KeyTime="0" Value="#202020"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Selected">
<Storyboard>
<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="SelectedVisual"/>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="HeaderElement">
<DiscreteObjectKeyFrame KeyTime="0" Value="#202020"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="PinnedStates">
<VisualState x:Name="Unpinned">
<Storyboard>
<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PinnedVisual"/>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Margin" Storyboard.TargetName="wrapper">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Thickness>1</Thickness>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Margin" Storyboard.TargetName="HeaderElement">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Thickness>0</Thickness>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="MouseOverVisual">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Collapsed</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Pinned"/>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Border x:Name="PinnedVisual" BorderBrush="Red" Background="Red" BorderThickness="0,0,0,4" Grid.ColumnSpan="2" Opacity="0"/>
<Border x:Name="MouseOverVisual" Background="Red" Grid.ColumnSpan="2" Opacity="0"/>
<Border x:Name="SelectedVisual" BorderBrush="Red" BorderThickness="1,0,1,1" Background="Red" Margin="0,-1,0,0" Opacity="0"/>
<Primitives:TabItemContentPresenter x:Name="HeaderElement" Background="Red" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" MinHeight="16" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}">
<Primitives:TabItemContentPresenter.Style>
<Style TargetType="{x:Type Primitives:TabItemContentPresenter}">
<Setter Property="Background" Value="Blue"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Primitives:TabItemContentPresenter}">
<Border BorderBrush="{TemplateBinding BorderBrush}" Background="OrangeRed" BorderThickness="{TemplateBinding BorderThickness}" >
<ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="IsTabStop" Value="False"/>
</Style>
</Primitives:TabItemContentPresenter.Style>
</Primitives:TabItemContentPresenter>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Also tried to get some results by creating copy of all other raddocking components.
Why can't there be a simple TabItemHeaderTemplate which can easily be styled?
Btw. I don't want to use any predefined theme.
Regard
Currently when you highlight a row in the child GridView, the ParentRow becomes highlighted. It would be really nice to have an option so that the ParentRow would be selected when a row in the child GridView is selected. This should work recursively selecting the ParentRow all the way up the hierarchy.
I've written a workaround, but it isn't pretty.
Please add this functionality. :)
My case involves a three tier hierarchical GridView. If I select a row in a third tier GridView, then I want its ParentRow to become selected on the second tier and the second tier's ParentRow to become selected on the first tier. Hopefully that makes sense.
Hello,
Is there a way to only display the TrackBall Info box when the right mouse button is clicked? We have a lot of info on our chart and sometimes the info box obscures the graph underneath.
Thanks.
Hi,
I tried to open a document using the OpenDocumentCommand but it's not working.
Could you provide me some information how to achieve this?
Btw: SaveCommand opens the SaveFileDialog as expected.
best regards
Dietmar
<
Window
x:Class
=
"telerikrtbtest.MainWindow"
xmlns:local
=
"clr-namespace:telerikrtbtest"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
Title
=
"MainWindow"
Width
=
"525"
Height
=
"350"
mc:Ignorable
=
"d"
>
<
Grid
>
<
Grid.Resources
/>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"*"
/>
</
Grid.RowDefinitions
>
<
telerik:RadRibbonButton
x:Name
=
"OpenDocumentButton"
Margin
=
"0,2,2,2"
telerik:RadRichTextBoxRibbonUI.RichTextCommand
=
"{Binding OpenDocumentCommand}"
Content
=
"open"
DataContext
=
"{Binding Commands, ElementName=richTextBoxAdv}"
/>
<
telerik:RadRichTextBox
x:Name
=
"radRichTextBox"
Grid.Row
=
"1"
/>
</
Grid
>
</
Window
>
I'm looking to achieve a Tile "Grid"-like behavior, with Tiles of varying sizes being placed with optional space between them within in a fixed area. The tiles would be resizable between the provided sizes (Single, Double, Quad) but also a 1x2 orientation (Tall) and the space between them would always been in increments of the fixed TilePlaceHolderSide value. See the behavior of the Windows 10 Start Menu Tiles for the closest easily-accessible example.
I am well aware that I'm going to have to do some customization, particularly in layout/measurement, but I'm just wondering:
Hello Developers,
I have simple scenario. Three charts with Zoom and Pan behavior and Track Ball behavior. When i zoom(or pan) in one chart then zoom(or pan) is bind to another charts.
I have to display datas for one day. I am using DateTimeCategoricalAxis and populate collection with data each minute. That means i have 1440 categories.
I display 3 series (bar, line, point). Everything works, but if i zoom in that scenario trackball info is not updated well.
Trackball info is still on same place and is blank.
You can see it in attached file.
<
Window
x:Class
=
"Chart.MainWindow"
xmlns:local
=
"clr-namespace:Chart"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
xmlns:chartView
=
"clr-namespace:Telerik.Windows.Controls.ChartView;assembly=Telerik.Windows.Controls.Chart"
mc:Ignorable
=
"d"
Title
=
"MainWindow"
>
<
Grid
>
<
Grid.Resources
>
<
Style
x:Key
=
"MonitorChartStyle"
TargetType
=
"telerik:RadCartesianChart"
>
<
Setter
Property
=
"Margin"
Value
=
"4"
/>
<
Setter
Property
=
"TrackBallLineStyle"
Value
=
"{x:Null}"
/>
</
Style
>
<
DataTemplate
x:Key
=
"TrackBallInfoTemplateOnlineQuality"
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
Rectangle
Fill
=
"DodgerBlue"
Width
=
"8"
Height
=
"8"
StrokeThickness
=
"1"
Stroke
=
"White"
VerticalAlignment
=
"Center"
Margin
=
"4,0,4,0"
/>
<
TextBlock
Text
=
"Tonnage: "
/>
<
TextBlock
Text
=
"{Binding DataPoint.Value, StringFormat={}{0:0.##}}"
/>
</
StackPanel
>
</
DataTemplate
>
</
Grid.Resources
>
<
StackPanel
Orientation
=
"Vertical"
>
<
telerik:RadCartesianChart
HorizontalAlignment
=
"Stretch"
Style
=
"{DynamicResource MonitorChartStyle}"
Zoom
=
"{Binding Path=Zoom, Mode=TwoWay}"
PanOffset
=
"{Binding Path=PanOffset, Mode=TwoWay}"
MinHeight
=
"200"
Height
=
"200"
>
<
telerik:RadCartesianChart.Grid
>
<
telerik:CartesianChartGrid
MajorLinesVisibility
=
"XY"
/>
</
telerik:RadCartesianChart.Grid
>
<
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:DateTimeCategoricalAxis
x:Name
=
"HorizontalAxis"
SmartLabelsMode
=
"SmartStep"
MajorTickInterval
=
"10"
MajorTickStyle
=
"{x:Null}"
/>
</
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:LinearAxis
x:Name
=
"VerticalAxis"
SmartLabelsMode
=
"SmartStepAndRange"
Minimum
=
"0"
Maximum
=
"100"
>
<
telerik:LinearAxis.LabelStyle
>
<
Style
TargetType
=
"TextBlock"
>
<
Setter
Property
=
"Width"
Value
=
"50"
/>
<
Setter
Property
=
"TextAlignment"
Value
=
"Right"
/>
</
Style
>
</
telerik:LinearAxis.LabelStyle
>
</
telerik:LinearAxis
>
</
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:BarSeries
ItemsSource
=
"{Binding DestinationDataSeries}"
CategoryBinding
=
"Category"
ValueBinding
=
"Value"
TrackBallInfoTemplate
=
"{StaticResource TrackBallInfoTemplateOnlineQuality}"
>
<!--TrackBallInfoTemplate="{StaticResource TrackBallInfoTemplateOnlineQuality}"-->
<
telerik:BarSeries.VerticalAxis
>
<
telerik:LinearAxis
SmartLabelsMode
=
"SmartStepAndRange"
HorizontalLocation
=
"Right"
Minimum
=
"0"
Maximum
=
"100"
>
<
telerik:LinearAxis.LabelStyle
>
<
Style
TargetType
=
"TextBlock"
>
<
Setter
Property
=
"Width"
Value
=
"50"
/>
<
Setter
Property
=
"TextAlignment"
Value
=
"Left"
/>
</
Style
>
</
telerik:LinearAxis.LabelStyle
>
</
telerik:LinearAxis
>
</
telerik:BarSeries.VerticalAxis
>
<
telerik:BarSeries.DefaultVisualStyle
>
<
Style
TargetType
=
"Border"
>
<
Setter
Property
=
"Background"
Value
=
"DodgerBlue"
/>
</
Style
>
</
telerik:BarSeries.DefaultVisualStyle
>
</
telerik:BarSeries
>
<
chartView:LineSeries
ItemsSource
=
"{Binding SourceDataSeries}"
CategoryBinding
=
"Category"
ValueBinding
=
"Value"
Stroke
=
"Red"
TrackBallInfoTemplate
=
"{StaticResource TrackBallInfoTemplateOnlineQuality}"
/>
<
telerik:PointSeries
ItemsSource
=
"{Binding OnlineDataSeries}"
CategoryBinding
=
"Category"
ValueBinding
=
"Value"
TrackBallInfoTemplate
=
"{StaticResource TrackBallInfoTemplateOnlineQuality}"
>
<
telerik:PointSeries.PointTemplate
>
<
DataTemplate
>
<
Path
Margin
=
"4"
Stroke
=
"Orange"
StrokeThickness
=
"1"
StrokeStartLineCap
=
"Square"
StrokeEndLineCap
=
"Square"
Stretch
=
"Uniform"
VerticalAlignment
=
"Center"
HorizontalAlignment
=
"Center"
>
<
Path.Data
>
<
PathGeometry
>
<
PathGeometry.Figures
>
<
PathFigure
StartPoint
=
"0,0"
>
<
LineSegment
Point
=
"4,4"
/>
</
PathFigure
>
<
PathFigure
StartPoint
=
"0,4"
>
<
LineSegment
Point
=
"4,0"
/>
</
PathFigure
>
</
PathGeometry.Figures
>
</
PathGeometry
>
</
Path.Data
>
</
Path
>
</
DataTemplate
>
</
telerik:PointSeries.PointTemplate
>
</
telerik:PointSeries
>
<
telerik:RadCartesianChart.Behaviors
>
<
telerik:ChartTrackBallBehavior
ShowIntersectionPoints
=
"False"
ShowTrackInfo
=
"True"
/>
<
telerik:ChartPanAndZoomBehavior
ZoomMode
=
"Horizontal"
DragMode
=
"Pan"
PanMode
=
"Horizontal"
/>
</
telerik:RadCartesianChart.Behaviors
>
</
telerik:RadCartesianChart
>
<
telerik:RadCartesianChart
HorizontalAlignment
=
"Stretch"
Style
=
"{DynamicResource MonitorChartStyle}"
Zoom
=
"{Binding Path=Zoom, Mode=TwoWay}"
PanOffset
=
"{Binding Path=PanOffset, Mode=TwoWay}"
MinHeight
=
"200"
Height
=
"200"
>
<
telerik:RadCartesianChart.Grid
>
<
telerik:CartesianChartGrid
MajorLinesVisibility
=
"XY"
/>
</
telerik:RadCartesianChart.Grid
>
<
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:DateTimeCategoricalAxis
x:Name
=
"HorizontalAxis2"
SmartLabelsMode
=
"SmartStep"
MajorTickInterval
=
"10"
MajorTickStyle
=
"{x:Null}"
/>
</
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:LinearAxis
x:Name
=
"VerticalAxis2"
SmartLabelsMode
=
"SmartStepAndRange"
Minimum
=
"0"
Maximum
=
"100"
>
<
telerik:LinearAxis.LabelStyle
>
<
Style
TargetType
=
"TextBlock"
>
<
Setter
Property
=
"Width"
Value
=
"50"
/>
<
Setter
Property
=
"TextAlignment"
Value
=
"Right"
/>
</
Style
>
</
telerik:LinearAxis.LabelStyle
>
</
telerik:LinearAxis
>
</
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:BarSeries
ItemsSource
=
"{Binding DestinationDataSeries}"
CategoryBinding
=
"Category"
ValueBinding
=
"Value"
TrackBallInfoTemplate
=
"{StaticResource TrackBallInfoTemplateOnlineQuality}"
>
<!--TrackBallInfoTemplate="{StaticResource TrackBallInfoTemplateOnlineQuality}"-->
<
telerik:BarSeries.VerticalAxis
>
<
telerik:LinearAxis
SmartLabelsMode
=
"SmartStepAndRange"
HorizontalLocation
=
"Right"
Minimum
=
"0"
Maximum
=
"100"
>
<
telerik:LinearAxis.LabelStyle
>
<
Style
TargetType
=
"TextBlock"
>
<
Setter
Property
=
"Width"
Value
=
"50"
/>
<
Setter
Property
=
"TextAlignment"
Value
=
"Left"
/>
</
Style
>
</
telerik:LinearAxis.LabelStyle
>
</
telerik:LinearAxis
>
</
telerik:BarSeries.VerticalAxis
>
<
telerik:BarSeries.DefaultVisualStyle
>
<
Style
TargetType
=
"Border"
>
<
Setter
Property
=
"Background"
Value
=
"DodgerBlue"
/>
</
Style
>
</
telerik:BarSeries.DefaultVisualStyle
>
</
telerik:BarSeries
>
<
chartView:LineSeries
ItemsSource
=
"{Binding SourceDataSeries}"
CategoryBinding
=
"Category"
ValueBinding
=
"Value"
Stroke
=
"Red"
TrackBallInfoTemplate
=
"{StaticResource TrackBallInfoTemplateOnlineQuality}"
/>
<
telerik:PointSeries
ItemsSource
=
"{Binding OnlineDataSeries}"
CategoryBinding
=
"Category"
ValueBinding
=
"Value"
TrackBallInfoTemplate
=
"{StaticResource TrackBallInfoTemplateOnlineQuality}"
>
<
telerik:PointSeries.PointTemplate
>
<
DataTemplate
>
<
Path
Margin
=
"4"
Stroke
=
"Orange"
StrokeThickness
=
"1"
StrokeStartLineCap
=
"Square"
StrokeEndLineCap
=
"Square"
Stretch
=
"Uniform"
VerticalAlignment
=
"Center"
HorizontalAlignment
=
"Center"
>
<
Path.Data
>
<
PathGeometry
>
<
PathGeometry.Figures
>
<
PathFigure
StartPoint
=
"0,0"
>
<
LineSegment
Point
=
"4,4"
/>
</
PathFigure
>
<
PathFigure
StartPoint
=
"0,4"
>
<
LineSegment
Point
=
"4,0"
/>
</
PathFigure
>
</
PathGeometry.Figures
>
</
PathGeometry
>
</
Path.Data
>
</
Path
>
</
DataTemplate
>
</
telerik:PointSeries.PointTemplate
>
</
telerik:PointSeries
>
<
telerik:RadCartesianChart.Behaviors
>
<
telerik:ChartTrackBallBehavior
ShowIntersectionPoints
=
"False"
ShowTrackInfo
=
"True"
/>
<
telerik:ChartPanAndZoomBehavior
ZoomMode
=
"Horizontal"
DragMode
=
"Pan"
PanMode
=
"Horizontal"
/>
</
telerik:RadCartesianChart.Behaviors
>
</
telerik:RadCartesianChart
>
<
telerik:RadCartesianChart
HorizontalAlignment
=
"Stretch"
Style
=
"{DynamicResource MonitorChartStyle}"
Zoom
=
"{Binding Path=Zoom, Mode=TwoWay}"
PanOffset
=
"{Binding Path=PanOffset, Mode=TwoWay}"
MinHeight
=
"200"
Height
=
"200"
>
<
telerik:RadCartesianChart.Grid
>
<
telerik:CartesianChartGrid
MajorLinesVisibility
=
"XY"
/>
</
telerik:RadCartesianChart.Grid
>
<
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:DateTimeCategoricalAxis
x:Name
=
"HorizontalAxis3"
SmartLabelsMode
=
"SmartStep"
MajorTickInterval
=
"10"
MajorTickStyle
=
"{x:Null}"
/>
</
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:LinearAxis
x:Name
=
"VerticalAxis3"
SmartLabelsMode
=
"SmartStepAndRange"
Minimum
=
"0"
Maximum
=
"100"
>
<
telerik:LinearAxis.LabelStyle
>
<
Style
TargetType
=
"TextBlock"
>
<
Setter
Property
=
"Width"
Value
=
"50"
/>
<
Setter
Property
=
"TextAlignment"
Value
=
"Right"
/>
</
Style
>
</
telerik:LinearAxis.LabelStyle
>
</
telerik:LinearAxis
>
</
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:BarSeries
ItemsSource
=
"{Binding DestinationDataSeries}"
CategoryBinding
=
"Category"
ValueBinding
=
"Value"
TrackBallInfoTemplate
=
"{StaticResource TrackBallInfoTemplateOnlineQuality}"
>
<!--TrackBallInfoTemplate="{StaticResource TrackBallInfoTemplateOnlineQuality}"-->
<
telerik:BarSeries.VerticalAxis
>
<
telerik:LinearAxis
SmartLabelsMode
=
"SmartStepAndRange"
HorizontalLocation
=
"Right"
Minimum
=
"0"
Maximum
=
"100"
>
<
telerik:LinearAxis.LabelStyle
>
<
Style
TargetType
=
"TextBlock"
>
<
Setter
Property
=
"Width"
Value
=
"50"
/>
<
Setter
Property
=
"TextAlignment"
Value
=
"Left"
/>
</
Style
>
</
telerik:LinearAxis.LabelStyle
>
</
telerik:LinearAxis
>
</
telerik:BarSeries.VerticalAxis
>
<
telerik:BarSeries.DefaultVisualStyle
>
<
Style
TargetType
=
"Border"
>
<
Setter
Property
=
"Background"
Value
=
"DodgerBlue"
/>
</
Style
>
</
telerik:BarSeries.DefaultVisualStyle
>
</
telerik:BarSeries
>
<
chartView:LineSeries
ItemsSource
=
"{Binding SourceDataSeries}"
CategoryBinding
=
"Category"
ValueBinding
=
"Value"
Stroke
=
"Red"
TrackBallInfoTemplate
=
"{StaticResource TrackBallInfoTemplateOnlineQuality}"
/>
<
telerik:PointSeries
ItemsSource
=
"{Binding OnlineDataSeries}"
CategoryBinding
=
"Category"
ValueBinding
=
"Value"
TrackBallInfoTemplate
=
"{StaticResource TrackBallInfoTemplateOnlineQuality}"
>
<
telerik:PointSeries.PointTemplate
>
<
DataTemplate
>
<
Path
Margin
=
"4"
Stroke
=
"Orange"
StrokeThickness
=
"1"
StrokeStartLineCap
=
"Square"
StrokeEndLineCap
=
"Square"
Stretch
=
"Uniform"
VerticalAlignment
=
"Center"
HorizontalAlignment
=
"Center"
>
<
Path.Data
>
<
PathGeometry
>
<
PathGeometry.Figures
>
<
PathFigure
StartPoint
=
"0,0"
>
<
LineSegment
Point
=
"4,4"
/>
</
PathFigure
>
<
PathFigure
StartPoint
=
"0,4"
>
<
LineSegment
Point
=
"4,0"
/>
</
PathFigure
>
</
PathGeometry.Figures
>
</
PathGeometry
>
</
Path.Data
>
</
Path
>
</
DataTemplate
>
</
telerik:PointSeries.PointTemplate
>
</
telerik:PointSeries
>
<
telerik:RadCartesianChart.Behaviors
>
<
telerik:ChartTrackBallBehavior
ShowIntersectionPoints
=
"False"
ShowTrackInfo
=
"True"
/>
<
telerik:ChartPanAndZoomBehavior
ZoomMode
=
"Horizontal"
DragMode
=
"Pan"
PanMode
=
"Horizontal"
/>
</
telerik:RadCartesianChart.Behaviors
>
</
telerik:RadCartesianChart
>
</
StackPanel
>
</
Grid
>
</
Window
>
and code behind:
using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Windows;
using Telerik.Charting;
namespace Chart
{
/// <
summary
>
/// Interaction logic for MainWindow.xaml
/// </
summary
>
public partial class MainWindow : Window, INotifyPropertyChanged
{
private Point _pan;
private Size _zoom;
public MainWindow()
{
InitializeComponent();
DestinationDataSeries = new ObservableCollection<
CategoricalDataPoint
>();
SourceDataSeries = new ObservableCollection<
CategoricalDataPoint
>();
OnlineDataSeries = new ObservableCollection<
CategoricalDataPoint
>();
var rand = new Random();
for (DateTime i = DateTime.Now; i <
DateTime.Now.AddDays
(1);
i
= i.AddMinutes(1))
{
DestinationDataSeries.Add(new CategoricalDataPoint
{
Category
=
i
,
Value
=
rand
.NextDouble() * 100
});
SourceDataSeries.Add(new CategoricalDataPoint
{
Category
=
i
,
Value
=
rand
.NextDouble() * 100
});
OnlineDataSeries.Add(new CategoricalDataPoint
{
Category
=
i
,
Value
=
rand
.NextDouble() * 100
});
}
DataContext
=
this
;
}
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged([CallerMemberName] string
propertyName
=
null
)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
#region MainWindow
public ObservableCollection<CategoricalDataPoint> DestinationDataSeries { get; }
public ObservableCollection<
CategoricalDataPoint
> SourceDataSeries { get; }
public ObservableCollection<
CategoricalDataPoint
> OnlineDataSeries { get; }
public Size Zoom
{
get => _zoom;
set
{
_zoom = value;
OnPropertyChanged();
}
}
public Point PanOffset
{
get => _pan;
set
{
_pan = value;
OnPropertyChanged();
}
}
#endregion
}
}
Thank you for your help and reply.
Best Regards Jan.