@hurumap-ui/charts

0.3.5-alpha.42 • Public • Published

Charts

This packages includes a library of HURUmap charts and a chart factory.

Installation

Install the module

npm install @hurumap-ui/charts --save

Usage

These components can be accessed by importing from the charts root directory:

/**
 * HURUmap dependencies
 */
import { BarChart } from '@hurumap-ui/charts';

export default function Chart() {
	return (
        <BarChart
            horizontal="horizontal"
            width={350}
            height={350}
            domainPadding={{ x: 15 }}
            data={Array(5)
                .fill(null)
                .map((_, index) => ({
                x: `${index} wrap label`,
                y: 10 * index + 1
                }))}
            parts={{
                axis: {
                dependent: {
                    tickValues: [10, 50, 90],
                    tickFormat: ['10%', '50%', '90%']
                }
                }
            }}
        />
    );
}



Hurumap

Readme

Keywords

Package Sidebar

Install

npm i @hurumap-ui/charts

Weekly Downloads

3

Version

0.3.5-alpha.42

License

GPL-2.0-or-later

Unpacked Size

233 kB

Total Files

41

Last publish

Collaborators

  • codeforafrica-tech
  • kilemensi