title: Adjusting The Frequency of X Axis Labels in WPF Charting Toolkit
body: <p>I am confounded by the XAML markup in general and especially for the chart toolkit and would greatly appreciate help sorting it out. I have successfully created a chart with the X axis showing timeline and Y axis showing a value using XAML below:</p>
  
  <pre><code>    &lt;chartingToolkit:Chart HorizontalAlignment="Left" Margin="44,12,0,0" Name="chart1" VerticalAlignment="Top" Height="521" Width="826"&gt;
          &lt;chartingToolkit:Chart.Axes&gt;
              &lt;chartingToolkit:DateTimeAxis IntervalType ="Hours" Interval="1"&gt;
                  &lt;chartingToolkit:DateTimeAxis.AxisLabelStyle&gt;
                      &lt;Style TargetType="chartingToolkit:DateTimeAxisLabel"&gt;
                          &lt;Setter Property="Template"&gt;
                              &lt;Setter.Value&gt;                                   
                                  &lt;Setter Property="StringFormat" Value="{}{0:H}" /&gt;
                              &lt;/Setter.Value&gt;
                          &lt;/Setter&gt;
                      &lt;/Style&gt;
                  &lt;/chartingToolkit:DateTimeAxis.AxisLabelStyle&gt;                       
              &lt;/chartingToolkit:DateTimeAxis&gt;
            &lt;/chartingToolkit:Chart.Axes&gt;
          &lt;chartingToolkit:LineSeries x:Name="LineSeries1" DependentValuePath="Value" IndependentValuePath="Key"  ItemsSource="{Binding}"&gt;
              &lt;chartingToolkit:LineSeries.DataPointStyle&gt;
                  &lt;Style TargetType="chartingToolkit:LineDataPoint"&gt;
                      &lt;Setter Property="Visibility" Value="Collapsed"/&gt;
                      &lt;Setter Property="Background" Value="violet"/&gt;
                      &lt;Setter Property="Opacity" Value="0" /&gt;
                  &lt;/Style&gt;
              &lt;/chartingToolkit:LineSeries.DataPointStyle&gt;
          &lt;/chartingToolkit:LineSeries&gt;
      &lt;/chartingToolkit:Chart&gt;
  </code></pre>
  
  <p>In the code-behind I populate a dictiory declared as  <code>Dictionary&lt;TimeSpan, float&gt; Dict = new Dictionary&lt;TimeSpan, float&gt;();</code> with values every minute for 2 hours (60 values) and set the datacontext for <code>lineseries1</code> to the dictionary as such:  <code>LineSeries1.DataContext = Dict.</code></p>
  
  <p>The graph draws beautifully, However as apparent from my futile attempt in the XAML. I need the X label and tick marks to show up only once per hour and not once per minute and I need it to show only hours and not minutes and seconds. My XAML code above for adjusting the interval and formatting of the label does not work. I would appreciate any pointer to steer me in the right direction.</p>
  
  <p>Thanks,
  Kalory</p>