title: Google Chart - Timelines: Scaling Axis
body: <p>I'm trying to create a chart using Google's Timeline that shows activity over the last 7 days, and I'm running into problems with scaling the x-axis. </p>
  
  <p>The chart is always trying to auto-scale to the data, which ruins the consistency I'd like to incorporate. I want the right side of the graph to be today's date, and the left side to be seven days before today's date.</p>
  
  <p>I can't seem to find anything for fixing the x-axis in the documentation for <a href="https://developers.google.com/chart/interactive/docs/gallery/timeline" rel="nofollow noreferrer">Timelines</a> or even <a href="https://developers.google.com/chart/interactive/docs/gallery/linechart#Configuration_Options" rel="nofollow noreferrer">Visualization</a> in general, but I have to believe a charting library has the ability to configure its own axes. Does anyone have a solution that works?</p>
  
  <p>A possible workaround I have is creating two data points -- one for today and one for today-7 -- and add them to the graph. This fixes the scaling problem, but now my graph has two arbitrary data points on it. (I know it's technically a separate question, but if anyone knows how to hide these two data points while still maintaining the fixed axis scale that'd be a win!)</p>
  
  <p>Here's what my graph looks like using just the raw data (notice the axis -- I would like this to be last 7 days):<img src="https://i.stack.imgur.com/PX9NF.png" alt="axis auto-scaled"></p>
  
  <p>And here's what it looks like with my two 'faked' data points:<img src="https://i.stack.imgur.com/8jZHu.png" alt="axis fixed-scaled, but two bad data points"></p>
  
  <p>EDIT: I have tried using the viewWindow.max and viewWindow.min properties, but it doesn't seem to be working.</p>