There is a new feature coming out in the next release that will let you configure the zoom buttons. You can use this now if you load version '1.1'.
Here is a summary of how to use it. There are two options, 'zoomButtons' and 'zoomButtonsOrder'. The zoomButtonsOrder value is just an array of strings that defaults to this:
Each string is the name of a zoom button corresponding to a button configuration. The buttons are configured with the zoomButtons option, which is an object with this default value:
zoomButtons: {
'1-second': { 'label': '1s', 'offset': [0, 0, 1] },
'5-seconds': { 'label': '5s', 'offset': [0, 0, 5] },
'10-seconds': { 'label': '10s', 'offset': [0, 0, 10] },
'15-seconds': { 'label': '15s', 'offset': [0, 0, 15] },
'1-minute': { 'label': '1min', 'offset': [0, 1, 0] },
'5-minutes': { 'label': '5min', 'offset': [0, 5, 0] },
'10-minutes': { 'label': '10min', 'offset': [0, 10, 0] },
'15-minutes': { 'label': '15min', 'offset': [0, 15, 0] },
'1-hour': { 'label': '1h', 'offset': [1, 0, 0] },
'6-hours': { 'label': '6h', 'offset': [6, 0, 0] },
'1-day': { 'label': '1d', 'offset': [1, 0, 0, 0, 0]},
'5-days': { 'label': '5d', 'offset': [5, 0, 0, 0, 0] },
'1-week': { 'label': '1w', 'offset': [7, 0, 0, 0, 0] },
'1-month': { 'label': '1m', 'offset': [1, 0, 0, 0, 0, 0] },
'3-months': { 'label': '3m', 'offset': [3, 0, 0, 0, 0, 0] },
'6-months': { 'label': '6m', 'offset': [6, 0, 0, 0, 0, 0] },
'1-year': { 'label': '1y', 'offset': [1, 0, 0, 0, 0, 0, 0] },
'max': {
'label': 'max',
'range': {
'start': null,
'end': null
}
}
For each button configuration, the 'offset' property is a timeofday value, extended to allow 1 to 7 array elements. The 'range' property value is an object with 'start' and 'end' properties which are either null or Dates. A null value means extend to the start or end of the data range. I haven't tested the range option much so you might find problems. (Now that I think about it, the start and end values should allow a timeofday value that specify a distance from the start or end of the data range, so you could, for example, configure a 'last minute' button with range: { start: [0, 1, 0] }.)