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
 *                    $adaptivetheme.myFunction()
 * --------------------------------------------------------
 */
import * as $adaptivetheme from "@amcharts/amcharts5/AdaptiveTheme";

Variables

GOLDEN_ANGLE
#

Type 137.5

Default 137.5

Functions

AdaptiveTheme(

root: Root,
settings: IAdaptiveThemeSettings

)

#

Returns Theme

"Adaptive" — generates a full palette from one or two base colors, choosing the other colors automatically in OKLCH so they stay perceptually balanced (even lightness/chroma, evenly spread hues).

Because a theme cannot take constructor parameters, this ships as a factory function:

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

The first generated color is the base color itself, so a brand color always appears in the chart. This theme is additive; it does not modify any built-in theme.

Click here for more info
@important

clamp(

x: number,
lo: number,
hi: number

)

#

Returns number

darkInterface(

base: IOKLCH,
baseColor: 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