Yahoo! UI Library

charts  3.3.0

Yahoo! UI Library > charts > CanvasShape
Search:
 
Filters

Class CanvasShape - extends CanvasGraphic

The Shape class creates a graphic object with editable properties.

Constructor

CanvasShape ( )

Properties

autoSize - string

Indicates whether or not the instance will size itself based on its contents.

type - string

Indicates the type of shape.

Methods

_initialize

private void _initialize ( )
Initializes the graphic instance.

_setProps

private void _setProps ( cfg )
Updates properties for the shape.
Parameters:
cfg <Object> Properties to update.

_validate

private void _validate ( )
Draws the graphic.

addClass

void addClass ( className )
Adds a class to the shape's node.
Parameters:
className <String> Name of the class to add.

setPosition

void setPosition ( , )
Positions the parent node of the shape.
Parameters:
, <Number> x The x-coordinate
, <Number> y The y-coordinate

toggleVisible

void toggleVisible ( val )
Sets the visibility of a shape.
Parameters:
val <Boolean> indicates whether or not the shape is visible.

update

void update ( cfg )
Updates the properties of the shape instance.
Parameters:
cfg <Object> Object literal containing properties to update.


Copyright © 2011 Yahoo! Inc. All rights reserved.