Endpoints

JS module returns an object that may implement one of the endpoints: version, supported, settings, disableDraw, beforeDraw, and afterDraw.

version

This must exist, and reports on the version of the API that this object implements. Currently supported version strings is "1"; this should be a string, not a number.

supported

If this member exists, it is expected to be an object that contains a member called visualType. This member must point to a string with the type of visual supported, or an array of strings that contain the types of visuals supported.

For example,

supported: {
  visualType: "trellis-bars"
},
Supported Visuals
calendar-heatmapfunnelsinglevalue
chordlinkrawtable
column-statsmaptable
correlationpacked-bubblestrellis-areas
correlation-flowpietrellis-bars
crosstabradialtrellis-groupedbars
extensionrawtabletrellis-lines
flowscatter 

settings

If a member with this name exists, it is expected to be a function that returns an array. Each array element is expected to be an object with the following members.

For example,

settings: function() {
  return [
    {
      id: "Column Name"
    },
    {
      id: "Max bar width",
      defaultValue: "50"
    },
    {
      id: "Color",
      default Value: "steelblue"
    }
  ];
},
Settings Specifications
MemberNameDescriptionDefault ValueMandatory
idColumn NameThe id of this setting.noneyes
displayNameColumn NameName used to display this setting.same as idno
typestringThe type of the variable. Current support limited to 'string'.'string'no
defaultValue""The default value for this setting.noneno

disableDraw

If a member exists with this name, and it is a function that returns a boolean variable set to true, we disable the drawing of the visual.

beforeDraw

If a member exists with this name, it is expected to be a function invoked before the draw event on the visual.

afterDraw

If a member exists with this name, it is expected to be a function invoked after the draw event on the underlying visual.