This question is locked. New answers and comments are not allowed.
Hi
I am trying to produce a graphic view of ocean tides (high, low, etc). I found an issue using the RadCartesianChart where it doesn't seem to obey the minimum and maximum in the way I think it should.
Here's my simple GraphDataItem class :
And the collection (GraphData) used by the graph, including the values I am testing with:
The XAML for the chart is listed here:
The above code produces the attached file "graphwithalldata.png"
When you change the graph and apply minimum and maximum properties to the DateTimeContinuousAxis as show below the graph goes rather weird:
The graph showing the strange results in attached as "graphwithminmax.png".
I am expecting the graph to ignore data points outside of the minimum / maximum date range and certainly for it not to plot them over the top of the real data. It seems to ignore the "date" part of the date/time and plots by the "time" part.
I have a second issue which is a real world example where I am plotting tide heights and want to show a single day per chart. As I am sure you are aware, the first tide for a day can be as late as 6:00am. This means the chart is missing a nice curve (especially when using the SplineAreaSeries - which is my plan) at the start. It abruptly starts at 6:00am. What I would like to do is provide the previous day's last tide (at perhaps 23:00) and use this to create the opening curve. It was upon doing this that I discovered the issue reported above.
Is there a way I can use your chart to produce this sort of tide graphic ? I was using another vendors chart, which did it fine - but I was changing over all of my controls for my Windows 8 app to Telerik, until I hit this show stopper.
Any ideas would be appreciated.
Regards
Gary
Telerik 2012.3 for Windows Phone 8
I am trying to produce a graphic view of ocean tides (high, low, etc). I found an issue using the RadCartesianChart where it doesn't seem to obey the minimum and maximum in the way I think it should.
Here's my simple GraphDataItem class :
Public Class GraphDataItem Public Property DateTime As Date Public Property Value As Double Public Sub New(itemDateTime As Date, itemValue As Double) DateTime = itemDateTime Value = itemValue End Sub End ClassAnd the collection (GraphData) used by the graph, including the values I am testing with:
Public Class GraphData Public Property Items As List(Of GraphDataItem) Public Sub New() Items = New List(Of GraphDataItem) Items.Add(New GraphDataItem(CDate("13-Feb-2011 18:30:00"), 1.2)) Items.Add(New GraphDataItem(CDate("13-Feb-2011 23:33:00"), 0.43)) Items.Add(New GraphDataItem(CDate("14-Feb-2011 03:50:00"), 1.4)) Items.Add(New GraphDataItem(CDate("14-Feb-2011 11:16:00"), 0.4)) Items.Add(New GraphDataItem(CDate("14-Feb-2011 17:35:00"), 0.9)) Items.Add(New GraphDataItem(CDate("14-Feb-2011 22:11:00"), 0.7)) Items.Add(New GraphDataItem(CDate("15-Feb-2011 03:00:00"), 1.45)) Items.Add(New GraphDataItem(CDate("15-Feb-2011 09:27:00"), 0.35)) End SubEnd ClassThe XAML for the chart is listed here:
<telerik:RadCartesianChart DataContext="{Binding Items}" > <telerik:RadCartesianChart.Grid> <telerik:CartesianChartGrid MajorLinesVisibility="X" > <telerik:CartesianChartGrid.MajorYLineStyle> <Style TargetType="Line"> <Setter Property="Shape.Stroke" Value="Gray" /> </Style> </telerik:CartesianChartGrid.MajorYLineStyle> </telerik:CartesianChartGrid> </telerik:RadCartesianChart.Grid> <telerik:RadCartesianChart.HorizontalAxis> <telerik:DateTimeContinuousAxis LabelFormat="dd MMM htt" FontSize="12" Margin="0" MajorStepUnit="Day" MajorStep="0.25" PlotMode="OnTicks" LabelInterval="1"> </telerik:DateTimeContinuousAxis> </telerik:RadCartesianChart.HorizontalAxis> <telerik:RadCartesianChart.VerticalAxis> <telerik:LinearAxis LabelInterval="1" Minimum="0" MaxHeight="2"> </telerik:LinearAxis> </telerik:RadCartesianChart.VerticalAxis> <telerik:LineSeries CombineMode="None" ItemsSource="{Binding}" > <telerik:LineSeries.ValueBinding> <telerik:PropertyNameDataPointBinding PropertyName="Value" /> </telerik:LineSeries.ValueBinding> <telerik:LineSeries.CategoryBinding> <telerik:PropertyNameDataPointBinding PropertyName="DateTime" /> </telerik:LineSeries.CategoryBinding> </telerik:LineSeries></telerik:RadCartesianChart>The above code produces the attached file "graphwithalldata.png"
When you change the graph and apply minimum and maximum properties to the DateTimeContinuousAxis as show below the graph goes rather weird:
<telerik:RadCartesianChart.HorizontalAxis> <telerik:DateTimeContinuousAxis LabelFormat="dd MMM htt" FontSize="12" Margin="0" MajorStepUnit="Day" MajorStep="0.25" Minimum="2011-02-14 0:00:00" Maximum="2011-02-15 0:00:00" PlotMode="OnTicks" LabelInterval="1"> </telerik:DateTimeContinuousAxis></telerik:RadCartesianChart.HorizontalAxis>The graph showing the strange results in attached as "graphwithminmax.png".
I am expecting the graph to ignore data points outside of the minimum / maximum date range and certainly for it not to plot them over the top of the real data. It seems to ignore the "date" part of the date/time and plots by the "time" part.
I have a second issue which is a real world example where I am plotting tide heights and want to show a single day per chart. As I am sure you are aware, the first tide for a day can be as late as 6:00am. This means the chart is missing a nice curve (especially when using the SplineAreaSeries - which is my plan) at the start. It abruptly starts at 6:00am. What I would like to do is provide the previous day's last tide (at perhaps 23:00) and use this to create the opening curve. It was upon doing this that I discovered the issue reported above.
Is there a way I can use your chart to produce this sort of tide graphic ? I was using another vendors chart, which did it fine - but I was changing over all of my controls for my Windows 8 app to Telerik, until I hit this show stopper.
Any ideas would be appreciated.
Regards
Gary
Telerik 2012.3 for Windows Phone 8