@times-visuals/barcode
v1.2.0
Published
Barcode-style chart
Downloads
5
Keywords
Readme
Barcode chart
Renders a barcode chart
Installation
# Yarn
$ yarn add @times-visuals/barcode
# npm
$ npm add @times-visuals/barcode
Usage
import Barcode from "@times-visuals/barcode";
const data = [
{
fieldName: 100,
otherField: "France"
},
{
fieldName: 200,
otherField: "Germany"
},
{
fieldName: 150,
otherField: "Poland"
}
];
export default () => <Barcode data={data} valueField="fieldName" />;
You can optionally pass a configuration option with a colour too:
import { colors } from "@times-stories/styles";
export default () => (
<Barcode
data={data}
valueField="fieldName"
config={{
color: colors.blue
}}
/>
);