title: Specify minimum and maximum axis for WPF chart
body: <p>This is a seemingly simple question but I cannot find a simple answer. I want to specify the minimum and maximum for the existing Y axis on the chart.</p>
  
  <p>Here's the chart:</p>
  
  <pre><code>&lt;Window x:Class="TempDataAnalyzer.MainWindow"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      Title="MainWindow" Height="350" Width="525" 
      xmlns:chartingToolkit="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit" 
      Loaded="Window_Loaded"&gt;
  &lt;Grid&gt;
       &lt;chartingToolkit:Chart  Name="lineChart" Title="Temperature" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"&gt;
          &lt;chartingToolkit:LineSeries  DependentValuePath="Value" IndependentValuePath="Key" ItemsSource="{Binding}" IsSelectionEnabled="True"/&gt;
       &lt;/chartingToolkit:Chart&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p></p>
  
  <p>Now, I'm adding values ranging between 0 to 71 on the Y axis:</p>
  
  <pre><code>public partial class MainWindow : Window
  {
      public MainWindow()
      {
          InitializeComponent();
      }
  
      private void Window_Loaded(object sender, RoutedEventArgs e)
      {
          List&lt;KeyValuePair&lt;int, int&gt;&gt; entries = new List&lt;KeyValuePair&lt;int, int&gt;&gt;();
          entries.Add(new KeyValuePair&lt;int, int&gt;(0, 0));
          entries.Add(new KeyValuePair&lt;int, int&gt;(1, 23));
          entries.Add(new KeyValuePair&lt;int, int&gt;(2, 45));
          entries.Add(new KeyValuePair&lt;int, int&gt;(3, 46));
          entries.Add(new KeyValuePair&lt;int, int&gt;(4, 71));
  
          lineChart.DataContext = entries;
      }
  
  }
  </code></pre>
  
  <p>However, I want the chart Y axis to show me a range between 0 and 100, regardless of what values I add. This is to keep it consistent with different charts on the same page.</p>
  
  <p><img src="https://i.stack.imgur.com/CwfhZ.png" alt="enter image description here"></p>