npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@domoinc/base-widget

v1.7.1

Published

BaseWidget - Domo Widget

Downloads

48

Readme

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.