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',
    },
  ]
},

AttributeTypeInfo
textString

To set the text of the button

3m | 2015 | all

typeString

To set multiplier for count

ytd | all | year | month | week | day | hour | minute

countNumber

Offset from start to zoom. This attribute is coupled with the type attribute to determine where to set the zoom level.

1 | 2 | 3