Socket
Socket
Sign inDemoInstall

@domoinc/base-widget

Package Overview
Dependencies
4
Maintainers
14
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @domoinc/base-widget

BaseWidget - Domo Widget


Version published
Weekly downloads
7
increased by250%
Maintainers
14
Install size
3.68 MB
Created
Weekly downloads
 

Readme

Source

BaseWidget

This widget doesn't do anything by it self but it contains all the "base" features that our widgets need. This widget should be "extended" to do anything that you need it to do. It does require attachment to an svg selection and uses our Notifier widget.

Config

this._config = {
      height: {
        name: 'Chart Height',
        description: 'Height of the chart.',
        category: 'Dimensions',
        type: 'number',
        value: 250,
        units: 'px'
      },
      width: {
        name: 'Chart Width',
        description: 'Width of the chart.',
        category: 'Dimensions',
        type: 'number',
        value: 250,
        units: 'px'
      },
      shouldValidate: {
        description: 'Flag for turning off data validation.',
        type: 'boolean',
        value: true
      },
      updateSizeableConfigs: {
        description: 'Flag for turning off the mimic of illustrator\'s scale functionality.',
        type: 'boolean',
        value: true
      }
};

Data Definition

// This should be set in the "extended" chart.
_Chart._dataDefinition = {};

Base Functions

  /**
   * Sets one or many of the data definition properties for the chart
   * @param  {object} obj Contains data definiton objects you would like to set or update.
   * @return {object}     Returns the chart for chainability.
   */
  dataDefinition: function (obj) {...},


  /**
   * This will get or set any of the chart's configuration options defined
   * in the 'chart._config' object.
   * @param  {String or Object}   item        If string, it will return the value for that config item.
   *
   * If object, it will update that config item with set value.
   * @param  {String or Number}   [value]     The value to update config item with.
   * @return {object}                         The chart to preserve chainability.
   */
  config: function (item, value) {...},


  /**
   * This will get or set any of the chart's accessors defined
   * in the 'chart._dataDefinition' object.
   * @param  {String or Object}   item        If string, it will return the function for that accessor item. If object, it will update that accessor with set function.
   * @param  {function}           [value]     The function to update accessor item with.
   * @return {object}                         The chart to preserve chainability.
   */
  accessors: function (item, value) {...},


  /**
   * Shorthand for config getter/setter
   */
  c: function (item, value) {...},


  /**
   * Shorthand for accessor getter function
   */
  a: function (item, value) {...},


  /**
   * Visits each config element.
   * If a config element has a size function it will update that configs value
   * with the returned result of its size function.
   */
  updateSizeableConfigs: function () {...},


  /**
   * Takes a theme obj and applies it to the widget's config elements.
   *
   * @param themeObj {Object} {"name": "Dark Bold", "domoDefinedTheme": true, "config": { gaugeFillPrimaryColor: '#1C5CAE'} };
   */
  applyTheme: function (themeObj) {...}

Create Widget

This widget doesn't do anything (by itself) so it does not have a createWidget.js file.

Keywords

FAQs

Last updated on 01 Jul 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc