Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

@times-visuals/barcode

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@times-visuals/barcode

Barcode-style chart

latest
npmnpm
Version
1.2.0
Version published
Maintainers
2
Created
Source

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
    }}
  />
);

FAQs

Package last updated on 14 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts