Skip to content

AdaptiveTheme

Type module

Sources

Items from AdaptiveTheme can be imported/included and used via following ways.

/**
* Import via: AdaptiveTheme.ts
* Access items like: $adaptivetheme.myVariable
*/
import * as $adaptivetheme from "@amcharts/amcharts5/AdaptiveTheme";

Variables

GOLDEN_ANGLE

Type 137.5Default 137.5

Functions

AdaptiveTheme(root: Root,
settings: IAdaptiveThemeSettings
)

Returns Theme

"Adaptive": makes a whole series palette from one or two colors. With one, the other colors share an even lightness and spread out over the color wheel; with two, they run as a gradient between them. The first color is baseColor itself, so a brand color appears in the chart (unless keepContrast has to change it).

It is a function rather than a class, so that it can take settings:

root.setThemes([
  am5themes_Adaptive(root, { baseColor: 0x2c6e91, dark: true })
]);

More info: Themes

clamp(x: number,
lo: number,
hi: number
)

Returns number

darkInterface(h: number,
primary: Color
)

Returns Partial

lerp(a: number,
b: number,
t: number
)

Returns number

lerpHue(a: number,
b: number,
t: number
)

Returns number

wrapHue(h: number)

Returns number