graph » options » buttons

buttons

[ root » graph » options » buttons ]

Zoom Button Controls: Use the buttons array as a way to define the zoom levels of your chart

options: {
  // define custom buttons
  buttons : [
    {
      text : '2006',
      type : 'year',
      // Difference from farthest year 2013 - 2006
      count : 2013-2006
    },
    {
      text : '2011',
      type : 'year',
      // Difference from farthest year 2013 - 2011
      count : 2013-2011
    },
    {
      text : '2012',
      type : 'year',
      // Difference from farthest year 2013 - 2012
      count : 2013-2012
    },
    {
      text : 'All',
      type : 'all',
    },
  ]
},



AttributeTypeDescription
countNumberSets the offset from start to zoom. This attribute is coupled with `type` to determine where to set zoom level.
Introduced in: v2.6.0
Chart types: Zoom Buttons
textStringSets the text of the button.
Introduced in: v2.6.0
Chart types: Zoom Buttons
typeStringSets the multiplier for `count`.
Accepted Values: ['all', 'day', 'hour', 'month', 'minute', 'week', 'year', 'ytd']
Introduced in: v2.6.0
Chart types: Zoom Buttons