Wondering what’s next for npm?Check out our public roadmap! »

fybdp-d3-kgTypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

d3-kg Data graph visualization library for React based on D3js


d3-kg is a modular chart component library that leverages React natively for rendering the components while using D3js under the hood for calculations. The library provides an easy way to get started creating charts without sacrificing customization ability.

Quick Links

Features

Chart types include:

  • Bar Chart
    • Single Series Vertical / Horizontal
    • Multi Series Vertical / Horizontal
    • Stacked Vertical / Horizontal
    • Stacked Normalized Vertical / Horizontal
    • Stacked Diverging Vertical / Horizontal
    • Marimekko
    • Radial
    • Sparkline
    • Waterfall
  • Line Chart
    • Single Series
    • Multi Series
    • Stacked
    • Stacked Normalized
    • Radial
    • Sparklines
  • Area Chart
    • Single Series
    • Multi Series
    • Stacked
    • Stacked Normalized
    • Radial
    • Sparklines
  • Bubble Chart
    • Linear
    • Radial
  • Scatter Chart
    • Linear
    • Radial
  • Pie Chart
    • Standard
    • Exploded
  • Donut Chart
  • Sankey chart
  • Hive Plot
  • Gauge
    • Radial
    • Linear
  • Map Chart
  • Heatmap
    • Standard
    • Year Calendar
    • Month Calendar

Additional features:

  • Legend
    • Discrete
    • Sequential
  • Axis
    • Linear
    • Radial
    • Advanced Label Positioning
  • Gestures
    • Pinch
    • Pan
    • Zoom
    • Move
  • Tooltip
    • Single Value
    • Grouped Values
  • Line/Area Series Symbols
  • Animations Enter/Update/Exit
  • Brush
  • Patterns
  • Gradients
  • Grid Lines
  • Mark Lines
  • BigInt Support
  • Auto Sizing
  • Range Lines
  • SSR

Install

To use d3-kg in your project, install it via npm/yarn:

npm i d3-kg --save

then import a chart type into your JSX element:

import { BarChart } from "d3-kg";
 
const data = [
  { key: 'IDS', data: 14 },
  { key: 'Malware', data: 5 },
  { key: 'DLP', data: 18 }
];
 
const App = () => <BarChart width={350} height={250} data={data} />;

Checkout this demo live or visit the demos page to learn more!

Development

If you want to run d3-kg locally, its super easy!

  • Set npm registry

  • npm set registry https://npm.fybdp.com

  • Clone the repository

  • npm install

  • npm run start

  • Browser opens to Storybook page

to publish the repo to git you can run:

  • git clone git@gitlab.fybdp.com:fuxi/d3-kg.git
  • npm login to login npm
  • npm version patch to bump the version
  • npm publish to bump the version
  • git push --follow-tags

thanks

Install

npm i fybdp-d3-kg

DownloadsWeekly Downloads

3

Version

1.0.1

License

Apache-2.0

Unpacked Size

3.67 MB

Total Files

448

Last publish

Collaborators

  • avatar