Main Page | Packages | Class Tree | Index | Help

xp.charting

class ChartUtils

Object
  |
  +--xp.charting.ChartUtils


class ChartUtils
extends Object

Holds various utility functions used throughout the charting system


Author:
ProWin Computers Ltd. - Rob Edgar

Version:
3.0.0.000

See also:


Field Summary

public static
degToRad
constant conversion factor

Method Summary

public static
brighterColor ( clr: Number, intensity: Number ): Number
create a bright shade of a color

public static
darkerColor ( clr: Number, intensity: Number ): Number
create a darker shade of a color

public static
distance ( x: Number, y: Number )
calculate the distance of a point from the origin

public static
formatPercent ( r: Number, dp: Number )
format a number as paercentage

public static
getColor ( r: Number, g: Number, b: Number )
combine RGB values into hex color number

public static
getPoint ( angle, radius )
calculate the coordinates of a point on a circle

public static
getRGB ( clr: Number ): Object
split a hex color number into its RGB values

public static
replace ( tgt, find, replace )




Field Documentation

degToRad

public static var degToRad
constant conversion factor


Method Documentation

brighterColor

public static function brighterColor(clr: Number,
 intensity: Number): Number
create a bright shade of a color

darkerColor

public static function darkerColor(clr: Number,
 intensity: Number): Number
create a darker shade of a color

distance

public static function distance(x: Number,
 y: Number)
calculate the distance of a point from the origin

Parameters:
x
x coordinate
y
y coordinate

formatPercent

public static function formatPercent(r: Number,
 dp: Number)
format a number as paercentage

Parameters:
r
ratio
dp
decimal places

getColor

public static function getColor(r: Number,
 g: Number,
 b: Number)
combine RGB values into hex color number

getPoint

public static function getPoint(angle,
 radius)
calculate the coordinates of a point on a circle

Parameters:
angle
the angle
radius
the radius of the circle

getRGB

public static function getRGB(clr: Number): Object
split a hex color number into its RGB values

replace

public static function replace(tgt,
 find,
 replace)

The documentation was generated from the following file:


Generated on 10/30/2005 9:34:02 PM by AS2Doc