npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fybdp-d3-kg

v1.0.1

Published

Knowledge Graph using React and D3.js

Downloads

418

Readme


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 [email protected]: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

  • D3
  • react
  • Reaviz
  • https://github.com/d3/d3/wiki/Plugins
  • http://www.coppelia.io/2014/07/an-a-to-z-of-extra-features-for-the-d3-force-layout/
  • https://bl.ocks.org/AndreaSimeone/3dce7e69ef27c871b9ce851379f6f7d8
  • https://algs4.cs.princeton.edu/42digraph/
  • https://blog.csdn.net/NoTwice/article/details/48275335
  • https://blog.csdn.net/wry2008wry/article/details/80812562
  • https://www.jb51.net/article/154227.htm