DateTime axis

Nov 17, 2011 at 1:39 PM

I am trying to get it to work but I don't succeed:

 

I want to display outside temperatures for a complete year with 1 hour interval values. (so I have 8760 value pairs).

for the horizontal axis I use a DateTime axis. But I have trouble setting the right settings for the horizontal axis.

I've set the MajorStep to 0.125 to display the majorgridlines each 3rd hour.

But I don't get the Minor gridlines to display. (settting MinorStep to 0.04166666666)

<TabItem Header="DateTime (XAML)">
            <oxy:Plot Title="DateTime axis (XAML binding)" Margin="20">
                <oxy:Plot.Axes>
                    <oxy:DateTimeAxis Position="Bottom"
                                      StringFormat="MMM-ddd-HH"
                                      MajorGridlineColor="Black"
                                      MajorGridlineStyle="Solid"
                                      MajorGridlineThickness="1"
                                      MajorStep="0.125"
                                     
                                      
                                      MinorGridlineColor="Red"
                                      MinorGridlineStyle="Solid"
                                      MinorGridlineThickness="1"
                                      MinorStep="0.041666666666"
                                      
                                      />
                </oxy:Plot.Axes>
                <oxy:Plot.Series>
                    <oxy:LineSeries ItemsSource="{Binding Data}"
                                    DataFieldX="Date"
                                    DataFieldY="Value"
                                    StrokeThickness="1"
                                    MarkerSize="3"
                                    MarkerType="Plus"
                                    TrackerFormatString="Time: {2:yyyy-MM-dd HH:mm:ss}&#x0a;Value: {4}" />
                </oxy:Plot.Series>
            </oxy:Plot>
        </TabItem>

 

 

 

Any suggestions ?

Coordinator
Nov 18, 2011 at 6:19 AM

I checked in a little change that let you set the MinorStep on the DateTimeAxis.