title: Horizontal Scroll Bar in Oxyplot WPF
body: <p>I'm trying to implement a utility for showing throughput over time in a system, and am using Oxyplot to visualise the data.</p>
  
  <p>Currently, zoom and pan are working as expected, but I would like some visual indication to the user which clearly shows whether the graph can be zoomed or panned.</p>
  
  <p>After ditching the idea of using a scroll bar (being neither able to accurately get the position of the visible section of the graph, nor correctly position the thumb of the scroll bar releative to the chart), I have settled on using icons to show whether there is any data on the chart which is hidden to the left or rightmost side.</p>
  
  <p>I would like these icons to work as buttons which allow the user to page left and right on the graph, however as with all things OxyPlot related, the implementation is far more complex than it first seems.</p>
  
  <p>I'm using the WPF implementation, which uses a ViewModel representing the overall data set, with each series item represented by its own model.
  This effectively renders almost every tutorial useless as the WPF implementation is significantly different to the basic OxyPlot package.</p>
  
  <p>Currently, the code behind in the view handles the click on the page left/right buttons. I cannot put this in my ViewModel as it must interract directly with the PlotControl object.</p>
  
  <pre><code> private void btnPageRight_Click(object sender, RoutedEventArgs e) {
          CategoryAxis axis = (CategoryAxis)PlotControl.ActualModel.Axes[0];
          double xAxisMin = axis.ActualMinimum;
          double xAxisMax = axis.ActualMaximum;
  
          double visibleSpan = xAxisMax - xAxisMin;
          double newMinOffset = xAxisMax + visibleSpan;
  
          PlotControl.Axes[0].Minimum = newMinOffset;
          PlotControl.Axes[0].Maximum = newMinOffset + visibleSpan;
  
          PlotControl.ActualModel.InvalidatePlot(true);
  
      }
  </code></pre>
  
  <p>As it stands, the above code throws no errors, but it does not work either.</p>
  
  <p>If anybody can advise a possible way to make OxyPlot scroll to a given position using just code behind, I would be grateful.
  As a last resort, I have pondered trying to simulate a mouse drag event to make this finicky beast behave.</p>
  
  <p>I find the need to work around the problem in that way quite offensive, but desparation leads to odd solutions...</p>