react-rt-chart
react-rt-chart copied to clipboard
rendering glitch
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 :
Here is my codesandbox.io
Here is the question on stackoverflow
For other people that have this issue, please remember to import the styling document as noted in the package description.
