@antonyjones87/charts
v0.1.0
Published
Data visualisation components for React projects
Downloads
23
Maintainers
Readme
packages / charts
The charts package offers a set of customisable chart components for visualising data in various formats, such as line charts, bar charts, and pie charts.
Explore other packages in the building-blocks monorepo
Getting started
To get started with using the components from this package in your project, follow these steps:
Install the
core-componentspackage from npm:npm install @antonyjones87/core-componentsIt's important to note that
core-componentsis a peer dependency of thechartspackage. This means that you'll need to installcore-componentsseparately in your project for the chart components to work correctly.Install the
chartspackage from npm:npm install @antonyjones87/chartsImport and use the components in your React application, ensuring they are wrapped within the
ThemeProvidercomponent from thecore-componentspackage:import { ThemeProvider } from '@antonyjones87/core-components'; import { BarChart } from '@antonyjones87/charts'; function App() { return ( <ThemeProvider theme="light"> <BarChart data={[ { label: 'January', value: 10 }, { label: 'February', value: 20 }, { label: 'March', value: 15 }, ]} xKey="label" yKey="value" /> </ThemeProvider> ); }
