title: QCharts Crop to Rectangle and Use Horizontal Scroll
body: <p>am trying to implement a custom graph going off the QtCharts Callout example. I want to restrict the selection of the chart to a specific area and make it possible to scroll horizontally while still displaying the Axis Values.</p>
  
  <p>the classes i am using are below</p>
  
  <p><a href="https://code.qt.io/cgit/qt/qtcharts.git/tree/examples/charts/callout/callout.cpp" rel="nofollow noreferrer">callout.cpp</a></p>
  
  <p><a href="https://code.qt.io/cgit/qt/qtcharts.git/tree/examples/charts/callout/callout.h" rel="nofollow noreferrer">callout.h</a></p>
  
  <p><a href="https://code.qt.io/cgit/qt/qtcharts.git/tree/examples/charts/callout/main.cpp" rel="nofollow noreferrer">main.cpp</a></p>
  
  <p><a href="https://code.qt.io/cgit/qt/qtcharts.git/tree/examples/charts/callout/view.cpp" rel="nofollow noreferrer">view.cpp</a></p>
  
  <p><a href="https://code.qt.io/cgit/qt/qtcharts.git/tree/examples/charts/callout/view.h" rel="nofollow noreferrer">view.h</a></p>
  
  <p>here is an example of what i mean</p>
  
  <p>say i want the selection region point1 = (5,0) point2 = (15,8) and the region is a QRect(point1,point2)</p>
  
  <p><a href="https://i.stack.imgur.com/epYA6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/epYA6.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/ZRKXo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZRKXo.png" alt="enter image description here"></a></p>
  
  <p>All points in the graph should be rendered but I want to be able to scroll sideways and keep the y_axis in view.</p>