Hi All,
I am trying to plot a graph with a LineSeries having x-axis as DateTimeAxis and y-axis as LinearAxis.
I have to display my x-axis (DateTimeAxis) in the format of mm:ss (i.e, in the minutes and seconds only). Here i dont want to display the hours part of the DateTime object bbut i want to add the hours part to the minutes part and display on the graph.
i.e,
i am creating the x-axis datapoints from the list of points (read from csv file)
Then i am constructing the DataTime object and converting the point reads from csv file to the DateTime format.
t = TimeSpan.FromSeconds(Convert.ToDouble(Points[index]));
date = new DateTime(2010, 8, 18, t.Hours, t.Minutes, t.Seconds);
(date i am assuming some dummy date and Points[index] gives me the point read from the csv file at that particular index)
Now, i want to add the hours part to the minutes part and show only Minutes and seconds.i.e, if the time is 3hours 2minutes and 8 sec i want to represent as 182:08 on the x-axis
I am trying with following xaml code but couldnot succeed
<chartingToolkit:DateTimeAxis Name="xAxis_chtVelocity" Orientation="X" ShowGridLines="False">
<chartingToolkit:DateTimeAxis.AxisLabelStyle>
<Style TargetType="{x:Type chartingToolkit:AxisLabel}">
<Setter Property="StringFormat" Value="{}{0:mm:ss}"/>
<!--<Setter Property="RenderTransformOrigin" Value="1,0.5" />
<Setter Property="RenderTransform">
<Setter.Value>
<RotateTransform Angle="-45" />
</Setter.Value>
</Setter>-->
</Style>
</chartingToolkit:DateTimeAxis.AxisLabelStyle>
Please help me out.
Thanks in Advance.