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-heatmap funnel singlevalue
chord link rawtable
column-stats map table
correlation packed-bubbles trellis-areas
correlation-flow pie trellis-bars
crosstab radial trellis-groupedbars
extension rawtable trellis-lines
flow scatter  

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
Member Name Description Default Value Mandatory
id Column Name The id of this setting. none yes
displayName Column Name Name used to display this setting. same as id no
type string The type of the variable. Current support limited to 'string'. 'string' no
defaultValue "" The default value for this setting. none no

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.