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

react-tooltip-bubble-chart

v1.0.37

Published

This is React bubble chart with tooltip to visualize data.

Downloads

209

Readme

react-tooltip-bubble-chart

FILES LICENSE DOWNLOADS

This is a bubble chart component that includes a tooltip using d3. I created a component based on React and Typescript by referring to the open source Draw a bubble chart. When the mouse hovers over the bubble chart object, the contents inside the bubble chart are displayed as a tooltip. You can also customize the movement of the bubble chart through the move setting. This library can be an excellent choice for data visualization. I hope this is what you were looking for.

✨ Features

  • ✌ Written TypeScript
  • ✅ Available in React
  • 💬 Possible Fine text alignment
  • 🌀 Available Interactive motion
  • 💅 Can Custom each bubble chart object
  • 🌟 Can check the contents of the object as a tooltip

🔧 Installation

npm install react-tooltip-bubble-chart #npm

📦 Example

Example

import "./App.css";
import BubbleChart from "react-tooltip-bubble-chart";

function Example() {
  const bubbleData = [
    {
      fillColor: "rgb(52, 202, 173, 0.3)",
      id: 5,
      name: "Setting\nme",
      size: 50,
      dYdX1: { dy: -2, dx: -3 },
      dYdX2: { dy: 8, dx: -20 },
    },
    {
      fillColor: "rgb(52, 202, 173, 0.3)",
      id: 6,
      name: "Getting\nStart",
      size: 120,
      dYdX1: { dy: -2, dx: -4 },
    },
    {
      fillColor: "rgb(52, 202, 173, 0.3)",
      id: 7,
      name: "Setting\nme",
      size: 50,
      dYdX1: { dy: -2, dx: -3 },
      dYdX2: { dy: 8, dx: -20 },
    },
  ];

  return (
    <div>
      <BubbleChart
        bubblesData={bubbleData}
        width={700}
        height={470}
        textFillColor="#717C84"
        backgroundColor="white"
        minValue={1}
        maxValue={150}
        move={true}
      />
    </div>
  );
}

export default Example;

✔ Bubble Chart DataType

export namespace BubbleChartTypes {
  export type Data = {
    fillColor: string;
    id: number;
    name: string;
    size: number;
    dYdX1: { dy: number; dx: number };
    dYdX2: { dy: number; dx: number };
    dYdX3: { dy: number; dx: number };
  };
}

👀 Props

| Prop | Description | Type | Test | | ----------------- | ------------------------------------------------------------ | --------- | ------------- | | bubblesData | An array of text and setting values ​​for the bubble chart | array | bubblesData[] | | move | Bubble chart animation settings dropdown | boolean | true | | width | Width of the entire area of ​​the bubble chart | number | 700 | | height | Height of the entire area of ​​the bubble chart | number | 470 | | backgroundColor | Set background color behind bubble chart | string | white | | textFillColor | Change the color of the text inside the bubble chart | string | #717C84 | | minValue | Bubble chart minimum weight value | number | 1 | | maxValue | Bubble chart maximum weight value callback | number | 150 |

⭕ Test

If you need intuitive usage, you can try this library right away through Storybook. You can check the operation more intuitively. Please refer to the information below.

✨Awsome Storybook Page✨

If you want to run it yourself, follow the command below.

  cd /storybook && npm run storybook

📜 License

MIT License