react-rt-chart icon indicating copy to clipboard operation
react-rt-chart copied to clipboard

rendering glitch

Open maifeeulasad opened this issue 6 years ago • 2 comments

I am trying to plot some live data, using react-rt-chart, and it works, but it gives me oddly looking graphs, with some black color. Here is my code :

import React from "react";
import RTChart from "react-rt-chart";

class Test extends React.Component {
  componentDidMount() {
    setInterval(() => this.forceUpdate(), 1000);
  }

  render() {
    var data = {
      date: new Date(),
      Car: Math.random() % 20,
      Bus: Math.random() % 30
    };

    return <RTChart fields={["Car", "Bus"]} data={data} />;
  }
}
export default Test;

Here is a snap, I waited for a long if it is a glitch and fixes itself, no luck :

react-rt-chart glitch

Here is my codesandbox.io

Here is the question on stackoverflow

maifeeulasad avatar Dec 14 '19 13:12 maifeeulasad

For other people that have this issue, please remember to import the styling document as noted in the package description.

RomanStadlhuber avatar Feb 03 '20 16:02 RomanStadlhuber

@RomanStadlhuber please check here, i have added c3.css as resource.

maifeeulasad avatar Feb 04 '20 06:02 maifeeulasad