Git Product home page Git Product logo

react-chord-diagram's People

Contributors

dependabot[bot] avatar flagollet avatar langfordg avatar thedanielforum avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

react-chord-diagram's Issues

Labels are getting hide after set outerRadius props

Problem

Hi! I was trying to fit the chart in my template because of the labels was overflowing the container and get cropped. So I try to set the outerRadius prop and the chart gets a little small like I want but the Labels get hide.

Code

import React, { useState } from "react";
import "./styles.css";
import ChordDiagram from "react-chord-diagram";

export default function App() {
  const [state, setState] = useState([
    [0, 9, 14, 16, 24, 18, 7, 21, 7, 6],
    [12, 0, 17, 16, 13, 23, 4, 16, 10, 8],
    [6, 13, 0, 6, 1, 8, 5, 8, 10, 14],
    [30, 15, 3, 0, 32, 13, 3, 53, 6, 8],
    [38, 28, 17, 54, 0, 27, 50, 138, 3, 4],
    [10, 7, 10, 13, 8, 0, 4, 8, 9, 8],
    [13, 12, 11, 16, 21, 23, 0, 31, 7, 8],
    [43, 22, 10, 45, 105, 47, 56, 0, 3, 8],
    [2, 3, 0, 0, 0, 0, 0, 0, 0, 6],
    [0, 0, 0, 2, 0, 0, 0, 0, 3, 0]
  ]);

  return (
    <div className="App">
      <ChordDiagram
        className="chartDiagram"
        matrix={state}
        componentId={1}
        groupLabels={[
          "Ignizione ON",
          "Movimento ON",
          "Movimento OFF",
          "LBL1",
          "LBL2",
          "Tagliando1",
          "Tagliando2",
          "Tagliando3",
          "Tagliando4",
          "Tagliando5"
        ]}
        groupColors={[
          "#2255A4",
          "#006629",
          "#15295E",
          "#790D1A",
          "#FFE000",
          "#060606",
          "#0F793B",
          "#15295E",
          "#B40224",
          "#13803F"
        ]}
        disableRibbonHover={false}
        disableGroupHover={false}
        outerRadius="150"
        innerRadius="140"
        blurOnHover={true}
        ribbonOpacity=".9"
        ribbonBlurOpacity="0.2"
        style={{
          fontFamily: "Sans serif",
          fontSize: "12px",
          color: "#333"
        }}
      />
    </div>
  );
}

Question

Am I doing something wrong or there is any solution for this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.