From 04a9ced788fe355b65b3da670ca990783ffd1fad Mon Sep 17 00:00:00 2001 From: Jacco van den Berg <39033624+LeeLenaleee@users.noreply.github.com> Date: Fri, 18 Mar 2022 14:32:43 +0100 Subject: [PATCH] Update guide for React Chart imported from React package cant register plugins, calling register on it will result in an error that the method is not found --- docs/tutorials/react/chart.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/tutorials/react/chart.md b/docs/tutorials/react/chart.md index afe5313..63fb0e4 100644 --- a/docs/tutorials/react/chart.md +++ b/docs/tutorials/react/chart.md @@ -6,7 +6,8 @@ Now you’ll want to create a chart component with a realtime scale. Import char ```jsx import React, { Component } from 'react'; -import { Line, Chart } from 'react-chartjs-2'; +import { Chart } from 'chart.js'; +import { Line } from 'react-chartjs-2'; import 'chartjs-adapter-luxon'; import StreamingPlugin from 'chartjs-plugin-streaming'; import './App.css';