I am having problems initializing a LineChart. I am receiving the following message when trying to render my component, the events function is always null, everything else looks ok. I am using
"react-timeseries-charts": "^0.15.5", and "pondjs": "^1.0.0-alpha.0", "react": "^16.8.6",
"react-dom": "^16.8.6",
LineChart.js?030a:344 Uncaught TypeError: this.props.series.events is not a function
at LineChart.renderLine (LineChart.js?030a:344)
at eval (LineChart.js?030a:326)
at Function..map..collect (underscore.js?17fb:205)
at LineChart.renderLines (LineChart.js?030a:325)
at LineChart.render (LineChart.js?030a:441)
at finishClassComponent (react-dom.development.js?61bb:14741)
at updateClassComponent (react-dom.development.js?61bb:14696)
at beginWork (react-dom.development.js?61bb:15644)
at performUnitOfWork (react-dom.development.js?61bb:19312)
at workLoop (react-dom.development.js?61bb:19352)
I am constructing my data using the following example:
const temperaturePoints = [
[1555786800, 71.22],
[1555790400, 73.4],
[1555794000, 74.44]
];
const chartSeries = timeSeries({
name: "temp_series",
columns: ["time", "temp"],
points: temperaturePoints
});
❔Question
I am having problems initializing a LineChart. I am receiving the following message when trying to render my component, the events function is always null, everything else looks ok. I am using "react-timeseries-charts": "^0.15.5", and "pondjs": "^1.0.0-alpha.0", "react": "^16.8.6", "react-dom": "^16.8.6",
LineChart.js?030a:344 Uncaught TypeError: this.props.series.events is not a function at LineChart.renderLine (LineChart.js?030a:344) at eval (LineChart.js?030a:326) at Function..map..collect (underscore.js?17fb:205) at LineChart.renderLines (LineChart.js?030a:325) at LineChart.render (LineChart.js?030a:441) at finishClassComponent (react-dom.development.js?61bb:14741) at updateClassComponent (react-dom.development.js?61bb:14696) at beginWork (react-dom.development.js?61bb:15644) at performUnitOfWork (react-dom.development.js?61bb:19312) at workLoop (react-dom.development.js?61bb:19352)
I am constructing my data using the following example: const temperaturePoints = [ [1555786800, 71.22], [1555790400, 73.4], [1555794000, 74.44] ]; const chartSeries = timeSeries({ name: "temp_series", columns: ["time", "temp"], points: temperaturePoints });
jsx: const style = styler([{ key: "temp", color: "#CA4040" }]);
export class Chart extends React.Component { render() { const { chartSeries } = this.props; return (
} }
Your Environment
| Software | Name/Version| VS Code, Current Chrome Browser, Updated Windows 10 OS, NodeJs (v10.15.3)
| ---------------- | ---------- | | react-timeseries-charts | | Browser | | Operating System |