solarnetwork-d3.js
function(key, enabled) {
      var val = enabled;
      if (key === undefined) {
        return this;
      }
      if (val === undefined) {
        val = this.map[key] === undefined;
      }
      return this.value(key, val === true ? true : null);
    }
function(key, enabled) {
      var val = enabled;
      if (key === undefined) {
        return this;
      }
      if (val === undefined) {
        val = this.map[key] === undefined;
      }
      return this.value(key, val === true ? true : null);
    }
function ( key , enabled ) { var val = enabled ; if ( key === undefined ) { return this ; } if ( val === undefined ) { val = this . map [ key ] === undefined ; } return this . value ( key , val === true ? true : null ) ; }
Set or toggle the enabled status of a given key.

<p>If the <em>enabled</em> parameter is not passed, then the enabled
status will be toggled to its opposite value.</p>

@param {String} key they key to set
@param {Boolean} enabled the optional enabled value to set
@returns {sn.Configuration} this object to allow method chaining
@preserve
Set or toggle the enabled status of a given key .