font property in appearanceConfig allows you to customize the typography of your graphs by specifying custom font families and colors for headings and body text.
Adding Custom Fonts
Step 1: Load Your Fonts
First, ensure your custom fonts are loaded in your application via@font-face declarations or web font services (like Google Fonts).
Step 2: Define Fonts in fontList
Create a fontList array that defines each font you want to use:
Step 3: Apply Fonts Using fontId
Reference your fonts in appearanceConfig using the fontId property:
Step 4: Customize Text Colors (Optional)
You can also specify custom colors for heading and body text:Reference
Font List
ThefontList array defines custom fonts available for use in your graphs. Each font is an object with these properties:
Unique identifier for the font. Use this value in the
fontId property to reference the font.Display name shown in the font selection UI.
CSS font-family value. Can include multiple fallback fonts separated by commas (e.g.,
'Helvetica Neue', Arial, sans-serif).Font
Thefont property in appearanceConfig allows you to apply fonts and colors to different text elements in your graphs.
Font configuration for graph titles and headings.
Font configuration for body text, labels, legends, and annotations.
color property accepts any valid CSS color value:
- Hex colors:
"#ff6b6b" - RGB/RGBA:
"rgb(255, 107, 107)"or"rgba(255, 107, 107, 0.8)" - Named colors:
"crimson","steelblue" - HSL/HSLA:
"hsl(0, 100%, 50%)"