I am constructing a chart to show stock values from a Google Spreadsheet macro, using Google App Script. I read the spreadsheet values into Charts.newDataTable(), then construct a filter with Charts.newNumberRangeFilter(). Then I bind the filter and LineChart together in a dashboard.
Now, what I really want is something like google.visualization.ChartRangeFilter in the Google API, a selectable range of dates to show in a graph. However for some reason, this isn't available from spreadsheet macros. So I am trying to make an alternative using NumberRangeFilter.
The problem I am having is that NumberRangeFilter allots a space on the X-axis of the chart for every date within the min and max of the range, regardless of whether or not I supply data for it. However, stock data is only valid for Mon-Fri of each week. That leaves two days of blank horizontal space between each week, and is not the desired effect I want. Here is a screenshot: screenshot
I also tried using CategoryPicker, as that allows me to control the values used, and also allows the use of Strings for dates, but that only allows me to choose one date at a time to add to the graph, and is not a good solution. There doesn't seem to be a way to use this with a slider bar.
Does anyone have any idea how to implement this in Google Spreadsheet based AppScript?