🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@cloudflare/chart-bar

Package Overview
Dependencies
Maintainers
40
Versions
578
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cloudflare/chart-bar

Cloudflare bar chart presentational components

6.0.2
latest
npm
Version published
Maintainers
40
Created
Source

@cloudflare/chart-bar

Cloudflare bar chart presentational components

Installation

Installation with yarn is recommended


$ yarn add @cloudflare/chart-bar

Usage

import React from 'react';
import { TopBarChart } from '../../src';

const randomData = [];
const N_CATEGORIES = 20,
  N_SERIES = 10;
[...Array(N_CATEGORIES).keys()].forEach(cat => {
  [...Array(N_SERIES).keys()].forEach(ser => {
    randomData.push({
      cat: `cat${cat}`,
      ser: `ser${ser}`,
      val: Math.round(Math.random() * 100)
    });
  });
});

const ViewComponent = () => (
  <TopBarChart
    height={420}
    data={randomData}
    categoryDimension="cat"
    stackDimension="ser"
    valueDimension="val"
    topN={20}
    valueLabel="Units"
  />
);

export default ViewComponent;

FAQs

Package last updated on 22 May 2025

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