Class: Format

Format

Contains visual parameters like fill, shadow, image, font.

Constructor

new Format(chart)

Parameters:
Name Type Description
chart Tee.Chart The parent chart this format object belongs to.
Properties:
Name Type Description
gradient Tee.Gradient Gradient properties to fill contents.
fill Color Color used to paint contents interior.
stroke Tee.Stroke Properties to draw lines around boundaries.
shadow Tee.Shadow Properties to draw a backdrop shadow.
font Tee.Font Properties to fill text.
image Tee.ChartImage Image to fill background.
round Tee.Point Width and height of rectangle rounded corners.
transparency Number Controls the transparency, from 0 (opaque) to 1 (transparent).
Source:

Methods

roundRect(x, y, width, height, xr, yr, cornersopt)

Draws a rectangle with rounded corners
Parameters:
Name Type Attributes Description
x Number Position in pixels of left side of rectangle.
y Number Position in pixels of top side of rectangle.
width Number Amount in pixels of rectangle width.
height Number Amount in pixels of rectangle height.
xr Number Amount in pixels of corners radius width.
yr Number Amount in pixels of corners radius height.
corners Array.<Boolean> <optional>
Optional, defines to paint top-left, top-right, bottom-left and bottom-right corners.
Source:

textHeight() → {Number}

Source:
Returns:
Returns the height in pixels of a given text using current font size and attributes.
Type
Number

textWidth() → {Number}

Source:
Returns:
Returns the width in pixels of a given text using current font size and attributes.
Type
Number