Skip to content

ResponsiveMaxTheme

Type classSince 5.22.0

A theme that fits charts to small spaces by adapting them, hiding parts only as the last step. It turns on the settings that fit labels and legends to the room they have:

  • autoLabels on axis renderers: labels spaced to fit, and hidden where they would be cut off or overlap another axis's labels.

  • keepInView on axis labels of a chart 400 px or smaller across the axis: a category or date period partly in view keeps its label in the part that is.

  • autoLabels on pie series: the pie moves aside or gets smaller, and its labels wrap, are shortened or are hidden, smallest slices first.

  • autoLabels on other series: bullet labels that would overlap or be cut off are hidden. Drawings on a stock chart are left alone.

  • autoFit on legends: smaller, then scrolling, with long names shortened.

  • autoHide on chart scrollbars: a vertical one goes on a chart 400 px wide or narrower, a horizontal one on a chart 300 px tall or lower (a stock chart is measured whole, not by panel); pinching zooms instead.

Below 400 px, text is drawn at 85% of its size, and axis labels, legend items and word cloud words get less padding; scrollbars get smaller margins.

Charts keep their padding. Funnel, pyramid and pictorial labels stay unless the chart is tiny, and radar labels stay outside the circle.

Labels added in code with their own font size, such as a title, are drawn smaller on charts under 600 × 450 px instead, down to three quarters of their size; a label in the middle of a donut is fitted to the hole by the pie's autoLabels. A label whose own scale is set is left alone.

Settings set on an element in code win over the theme, as with any theme:

autoLabels: false on a series or renderer turns that part off.

More info: ResponsiveMax theme

Sources

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

Inheritance

ResponsiveMaxTheme extends ResponsiveBaseTheme.

ResponsiveMaxTheme is not extended by any other symbol.

Properties

36 inherited items
heightL

StaticType (width: number, height: number) => booleanInherited from ResponsiveBaseTheme

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

heightM

StaticType (width: number, height: number) => booleanInherited from ResponsiveBaseTheme

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

heightS

StaticType (width: number, height: number) => booleanInherited from ResponsiveBaseTheme

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

heightXL

StaticType (width: number, height: number) => booleanInherited from ResponsiveBaseTheme

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

heightXS

StaticType (width: number, height: number) => booleanInherited from ResponsiveBaseTheme

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

heightXXL

StaticType (width: number, height: number) => booleanInherited from ResponsiveBaseTheme

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

heightXXS

StaticType (width: number, height: number) => booleanInherited from ResponsiveBaseTheme

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

isL

StaticType (width: number, height: number) => booleanInherited from ResponsiveBaseTheme

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

isM

StaticType (width: number, height: number) => booleanInherited from ResponsiveBaseTheme

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

isS

StaticType (width: number, height: number) => booleanInherited from ResponsiveBaseTheme

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

isXL

StaticType (width: number, height: number) => booleanInherited from ResponsiveBaseTheme

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

isXS

StaticType (width: number, height: number) => booleanInherited from ResponsiveBaseTheme

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

isXXL

StaticType (width: number, height: number) => booleanInherited from ResponsiveBaseTheme

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

isXXS

StaticType (width: number, height: number) => booleanInherited from ResponsiveBaseTheme

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

L

StaticType numberInherited from ResponsiveBaseTheme

Breakpoint of 600 pixels.

M

StaticType numberInherited from ResponsiveBaseTheme

Breakpoint of 400 pixels.

maybeL

StaticType (width: number, height: number) => booleanInherited from ResponsiveBaseTheme

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

maybeM

StaticType (width: number, height: number) => booleanInherited from ResponsiveBaseTheme

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

maybeS

StaticType (width: number, height: number) => booleanInherited from ResponsiveBaseTheme

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

maybeXL

StaticType (width: number, height: number) => booleanInherited from ResponsiveBaseTheme

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

maybeXS

StaticType (width: number, height: number) => booleanInherited from ResponsiveBaseTheme

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

maybeXXL

StaticType (width: number, height: number) => booleanInherited from ResponsiveBaseTheme

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

maybeXXS

StaticType (width: number, height: number) => booleanInherited from ResponsiveBaseTheme

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

responsiveRules

Type IResponsiveRule[]Default []Inherited from ResponsiveBaseTheme

Rules added to the theme.

S

StaticType numberInherited from ResponsiveBaseTheme

Breakpoint of 300 pixels.

widthL

StaticType (width: number, height: number) => booleanInherited from ResponsiveBaseTheme

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

widthM

StaticType (width: number, height: number) => booleanInherited from ResponsiveBaseTheme

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

widthS

StaticType (width: number, height: number) => booleanInherited from ResponsiveBaseTheme

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

widthXL

StaticType (width: number, height: number) => booleanInherited from ResponsiveBaseTheme

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

widthXS

StaticType (width: number, height: number) => booleanInherited from ResponsiveBaseTheme

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

widthXXL

StaticType (width: number, height: number) => booleanInherited from ResponsiveBaseTheme

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

widthXXS

StaticType (width: number, height: number) => booleanInherited from ResponsiveBaseTheme

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

XL

StaticType numberInherited from ResponsiveBaseTheme

Breakpoint of 800 pixels.

XS

StaticType numberInherited from ResponsiveBaseTheme

Breakpoint of 200 pixels.

XXL

StaticType numberInherited from ResponsiveBaseTheme

Breakpoint of 1000 pixels.

XXS

StaticType numberInherited from ResponsiveBaseTheme

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.

constructor(root: Root,
isReal: boolean
)

Returns ResponsiveMaxTheme

dispose()

Returns void

removeRule(rule: IResponsiveRule)

Returns void

Removes a responsive rule from the theme, taking back its settings if it applies.

4 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

newEmpty(root: Root)

StaticReturns InstanceTypeInherited from ResponsiveBaseTheme

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

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

ResponsiveMaxTheme does not have any events.