Skip to content

ResponsiveTheme

Type class

A theme that changes chart settings as the chart's size changes, so charts fit small spaces. new() comes with built-in rules for the common chart types; newEmpty() starts with none, for rules of your own.

More info: Responsive

Sources

This information about ResponsiveTheme is provided for reference only and is not available through exported packages and thus should not be imported or used on its own.

Inheritance

ResponsiveTheme extends Theme.

ResponsiveTheme is not extended by any other symbol.

Properties

L

StaticType numberDefault 600

Breakpoint of 600 pixels.

M

StaticType numberDefault 400

Breakpoint of 400 pixels.

responsiveRules

Type IResponsiveRule[]Default []

Rules added to the theme.

S

StaticType numberDefault 300

Breakpoint of 300 pixels.

XL

StaticType numberDefault 800

Breakpoint of 800 pixels.

XS

StaticType numberDefault 200

Breakpoint of 200 pixels.

XXL

StaticType numberDefault 1000

Breakpoint of 1000 pixels.

XXS

StaticType numberDefault 100

Breakpoint of 100 pixels.

Methods

addRule(rule: IResponsiveRule)

Returns IResponsiveRule

Adds a responsive rule and returns it. It applies at once if it is relevant.

More info: Responsive

constructor(root: Root,
isReal: boolean
)

Returns ResponsiveTheme

dispose()

Returns void

heightL(_width: number,
height: number
)

StaticReturns boolean

true when the height is at most L (600 pixels).

heightM(_width: number,
height: number
)

StaticReturns boolean

true when the height is at most M (400 pixels).

heightS(_width: number,
height: number
)

StaticReturns boolean

true when the height is at most S (300 pixels).

heightXL(_width: number,
height: number
)

StaticReturns boolean

true when the height is at most XL (800 pixels).

heightXS(_width: number,
height: number
)

StaticReturns boolean

true when the height is at most XS (200 pixels).

heightXXL(_width: number,
height: number
)

StaticReturns boolean

true when the height is at most XXL (1000 pixels).

heightXXS(_width: number,
height: number
)

StaticReturns boolean

true when the height is at most XXS (100 pixels).

isL(width: number,
height: number
)

StaticReturns boolean

true when both the width and the height are at most L (600 pixels).

isM(width: number,
height: number
)

StaticReturns boolean

true when both the width and the height are at most M (400 pixels).

isS(width: number,
height: number
)

StaticReturns boolean

true when both the width and the height are at most S (300 pixels).

isXL(width: number,
height: number
)

StaticReturns boolean

true when both the width and the height are at most XL (800 pixels).

isXS(width: number,
height: number
)

StaticReturns boolean

true when both the width and the height are at most XS (200 pixels).

isXXL(width: number,
height: number
)

StaticReturns boolean

true when both the width and the height are at most XXL (1000 pixels).

isXXS(width: number,
height: number
)

StaticReturns boolean

true when both the width and the height are at most XXS (100 pixels).

maybeL(width: number,
height: number
)

StaticReturns boolean

true when the width or the height is at most L (600 pixels).

maybeM(width: number,
height: number
)

StaticReturns boolean

true when the width or the height is at most M (400 pixels).

maybeS(width: number,
height: number
)

StaticReturns boolean

true when the width or the height is at most S (300 pixels).

maybeXL(width: number,
height: number
)

StaticReturns boolean

true when the width or the height is at most XL (800 pixels).

maybeXS(width: number,
height: number
)

StaticReturns boolean

true when the width or the height is at most XS (200 pixels).

maybeXXL(width: number,
height: number
)

StaticReturns boolean

true when the width or the height is at most XXL (1000 pixels).

maybeXXS(width: number,
height: number
)

StaticReturns boolean

true when the width or the height is at most XXS (100 pixels).

newEmpty(root: Root)

StaticReturns InstanceType

Creates the theme without its built-in rules, for rules of your own.

removeRule(rule: IResponsiveRule)

Returns void

Removes a responsive rule from the theme.

widthL(width: number,
_height: number
)

StaticReturns boolean

true when the width is at most L (600 pixels).

widthM(width: number,
_height: number
)

StaticReturns boolean

true when the width is at most M (400 pixels).

widthS(width: number,
_height: number
)

StaticReturns boolean

true when the width is at most S (300 pixels).

widthXL(width: number,
_height: number
)

StaticReturns boolean

true when the width is at most XL (800 pixels).

widthXS(width: number,
_height: number
)

StaticReturns boolean

true when the width is at most XS (200 pixels).

widthXXL(width: number,
_height: number
)

StaticReturns boolean

true when the width is at most XXL (1000 pixels).

widthXXS(width: number,
_height: number
)

StaticReturns boolean

true when the width is at most XXS (100 pixels).

3 inherited items
new(root: Root)

StaticReturns InstanceTypeInherited from Theme

Use this method to create an instance of this class.

More info: Getting started: new element syntax

rule(themeClass: K,
themeTags: Array
)

Returns TemplateInherited from Theme

Returns the rule for a class and theme tags, as a Template. Settings set on it go to every element of that class (or a class extending it) that has all of these tags. The same class and tags return the same rule.

More info: Themes

ruleRaw(themeClass: string,
themeTags: Array
)

Returns TemplateInherited from Theme

Same as rule(), but takes any class name, without type checks.

More info: Themes

Events

ResponsiveTheme does not have any events.