@servicetitan/anvil2-ext-charts
v0.2.2
Published
<h1 align="center"> Anvil2 Extended Charts </h1>
Keywords
Readme
The Anvil2 Extended Charts library is a package for hosting common components and code related to data visualization. This currently hosts several themes for use with amCharts 5.
Getting Started
Installation
We recommend installing the Charts package by running the following npm command (or the equivalent yarn/pnpm command) in your project folder:
npm install @servicetitan/anvil2-ext-chartsUsage
Themes for amCharts 5 can be imported as named exports from the package root:
import { ThemeCategorical } from "@servicetitan/anvil2-ext-charts/am5";Then when creating a chart, the chosen theme can be added using setThemes:
const root = am5.Root.new("chartdiv");
root.setThemes([am5themes_Animated.new(root), ThemeCategorical.new(root)]);The themes currently support three color styles: ThemeMonochrome, ThemeCategorical, and ThemeSemantic, and all three themes currently support donut charts and bar charts.
