0.0.12 • Published 2 years ago

isometric-bar-chart v0.0.12

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

isometric-bar-chart

npm npm bundle size npm

Demo

https://chule.github.io/isometric-bar-chart/

Features

React barchart for displaying ordinal data using animated isometric bars

Installation

Install package from NPM

npm install isometric-bar-chart

Usage

import Barchart from "isometric-bar-chart";

const MyComponent = () => {
  const myData = [
    { name: "first", value: 12 },
    { name: "second", value: 20 },
    { name: "third", value: 30 },
    { name: "something", value: 0 },
    ...etc,
  ];

  return (
    <Barchart
      data={myData}
      svgWidth={800}
      svgHeight={400}
      marginTop={100}
      marginRight={50}
      marginBottom={50}
      marginLeft={50}
      color={"#AE3E33"}
      sizeCorrector={2}
      delayMultiplier={100}
      fontSize={16}
    />
  );
};

export default MyComponent;

Props

PropertyPropTypeRequiredDefault Value
datacustom(validates usage of scale keys)falsedata
svgWidthnumberfalse800
svgHeightnumberfalse400
marginTopnumberfalse100
marginRightnumberfalse50
marginBottomnumberfalse50
marginLeftnumberfalse50
colorstringfalse"#AE3E33"
sizeCorrectornumberfalse2
delayMultipliernumberfalse100
fontSizenumberfalse16

data

An array of data points with a value for the x axis and y axis respectively. The key for the x axis should be "name" and for the y axis should be "value"

[
  { "name": "#1", "value": 12 },
  { "name": "#2", "value": 20 },
  { "name": "#3", "value": 30 },
  { "name": "#4", "value": 0 },
  { "name": "#5", "value": 63 },
  { "name": "#6", "value": 35 },
  { "name": "#7", "value": 22 },
  { "name": "#8", "value": 35 },
  { "name": "#9", "value": 22 }
]
0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago