# Yahoo! UI Library

### charts 3.3.0

Yahoo! UI Library > charts > Renderer
Search:
Filters Show Private Show Protected Show Deprecated

## Class Renderer

Known Subclasses:
  Axis

The Renderer class is a base class for chart components that use the `styles` attribute.

### Constructor

Renderer `( )`

### Properties

#### _styles - `private object`

### Methods

#### _getDefaultStyles

`protected _getDefaultStyles ( )`
Gets the default value for the `styles` attribute.

Returns: ``
  Object

#### _mergeStyles

`protected _mergeStyles ( a , b )`
Merges to object literals so that only specified properties are overwritten.

Parameters:
  `a <Object>` Hash of new styles
  `b <Object>` Hash of original styles

Returns: ``
  Object

#### _setStyles

`protected _setStyles ( newStyles )`
Method used by `styles` setter.

Parameters:
  `newStyles <Object>` Hash of properties to update.

Returns: ``
  Object

### Events

#### graphicChange

`graphicChange ( event )`
Fires when the value for the configuration attribute 'graphic' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:
  `event <Event.Facade>` An Event Facade object with the following attribute specific properties added:
  prevVal
    The value of the attribute, prior to it being set
  newVal
    The value the attribute is to be set to
  attrName
    The name of the attribute being set
  subAttrName
    If setting a property within the attribute's value, the name of the sub-attribute property being set

#### stylesChange

`stylesChange ( event )`
Fires when the value for the configuration attribute 'styles' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.

Parameters:
  `event <Event.Facade>` An Event Facade object with the following attribute specific properties added:
  prevVal
    The value of the attribute, prior to it being set
  newVal
    The value the attribute is to be set to
  attrName
    The name of the attribute being set
  subAttrName
    If setting a property within the attribute's value, the name of the sub-attribute property being set

### Configuration Attributes

#### graphic `- Graphic`

The graphic in which drawings will be rendered.

#### styles `- Object`

Hash of style properties for class

Copyright © 2011 Yahoo! Inc. All rights reserved.