API Reference
Namespaces
Classes
Events
Global
Externals

Class: ThisPlugin

ThisPlugin

Generic Plugin

Contains the template code to include your own plugin in a sidebar of the chart.

To use:

  1. Rename the parent folder of this file to the name you want to use for the plugin.
  2. Rename the genericPlugin configuration from the default configuration with your new plugin name.
    • Customize the toggleMarkup property.
  • Set the location property to "top" or "right".
  • You may add extra properties if you wish. They will be available in the render and unrender functions (see below).
  1. Import this file (plugin.js) into your template.
  2. Add your custom code, images and css. You should not need to modify ./bootstrap.js in any way.
    • in class ThisPlugin below, render method is called when the panel is revealed.
  • in class ThisPlugin below, unrender method is called when the panel is hidden.
  • Both functions have instance properties available for access: - Place your markup in this.node. - this.params contains the properties from default configuration. - container: location of toggle button. - location: whether to put the plugin area on the top or the side of the chart. - toggleMarkup: HTML markup for the toggle button. - stx: the ChartEngine object. - context: the chart user interface context. - this.pluginName is the name of your component.
  • ThisPlugin ships with demo render and unrender functionality.
  1. Replace the string "genericPlugin" in the style names in the css file (ui.css) with your plugin name.

You can add more than one custom plugin. Just copy the genericPlugin and follow the same pattern above.


new ThisPlugin()

Methods


render()

This function is called when the panel is revealed. You will need to customize this function to render your markup.


unrender()

This function is called when the panel is hidden. If you have any takedown requirements they should be placed here.