1.7.1 • Published 8 years ago

@domoinc/base-widget v1.7.1

Weekly downloads
6
License
SEE LICENSE IN LI...
Repository
-
Last release
8 years ago

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.

@infinitebrahmanuniverse/nolb-_dom@everything-registry/sub-chunk-251liquid_gauge@domoinc/anthem-trend-indicator@domoinc/count-date-clock@domoinc/countdown-clock-circle@domoinc/daily-trend-timeline@domoinc/date-value-table@domoinc/domo-multi-select@domoinc/domo-select@domoinc/domo-tooltip@domoinc/donut@domoinc/donut-with-legend@domoinc/dropdown@domoinc/eight-ball@domoinc/filled-shape@domoinc/folded-funnel@domoinc/funnel@domoinc/funnel-bar@domoinc/funnel-label@domoinc/ca-gauge-with-text@domoinc/ca-icon-trends-with-text@domoinc/ca-male-percent-gauge-banner@domoinc/ca-needle-gauge@domoinc/ca-percent-gauge-with-text@domoinc/ca-post-indicators@domoinc/ca-process-circle@domoinc/ca-progress-bar-with-text@domoinc/ca-small-placing-stand@domoinc/ca-stage-progress@domoinc/ca-stats-center-icon@domoinc/ca-stats-circle@domoinc/ca-stats-corner-icon@domoinc/ca-stats-pill@domoinc/ca-steps-with-text@domoinc/ca-time-summary-number@domoinc/ca-trend-number@domoinc/ca-weather-icons@domoinc/canada-fsa-map@domoinc/carousel@domoinc/chord-diagram@domoinc/comparison-bar-chart@domoinc/arrow-single-value-indicator@domoinc/axis@domoinc/bar-capacity-gauge@domoinc/bar-gauge@domoinc/bars@domoinc/bent-line-with-dot@domoinc/best-time-line@domoinc/bubbles-by-category-filled@domoinc/button@domoinc/ca-budget-half-circle@domoinc/ca-cloud-number@domoinc/ca-digital-clock-with-text@domoinc/ca-filled-image-and-summary-number@domoinc/actual-to-budget-gauge@domoinc/anthem-percent-trend@domoinc/area-tooltip@domoinc/bar-chart@domoinc/funnel-layer@domoinc/funnel-lines@domoinc/funnel-total-bar@domoinc/funnel-total-layer@domoinc/gantt-chart@domoinc/gauge@domoinc/growing-shape@domoinc/heat-map@domoinc/horizontal-heat-map-bar@domoinc/horizontal-multi-series-bars@domoinc/icon-gauge@domoinc/image-svg@domoinc/image-tooltip@domoinc/legend@domoinc/liquid-fill-gauge@domoinc/marimekko@domoinc/market-funnel-chart@domoinc/merged-states@domoinc/metric-comparison-bars@domoinc/multi-bar-capacity-gauge@domoinc/multi-line@domoinc/multi-line-chart@domoinc/multi-line-text@domoinc/multi-metric-comparison-bar-chart@domoinc/multi-metric-gauge@domoinc/multi-repeating-image-bars@domoinc/multi-titled-sales-marker@domoinc/multi-vbar-circles@domoinc/multiline@domoinc/multiline-chart@domoinc/needle-gauge@domoinc/nested-bar-chart@domoinc/nested-pie@domoinc/people-bubbles@domoinc/people-bubbles-xy@domoinc/percent-circle@domoinc/person-bubble@domoinc/person-bubble-with-gauge@domoinc/pie@domoinc/pie-with-legend@domoinc/point-plot-scale
1.7.1

8 years ago

1.7.0

8 years ago

1.6.0

8 years ago

1.5.3

8 years ago

1.5.2

8 years ago

1.5.1

8 years ago

1.5.0

8 years ago

1.4.1

8 years ago

1.4.0

8 years ago

1.3.0

8 years ago