score:0
I had the same error while trying to use chartkick gem for rails.
And the solution was to install moment.js
(npm install moment --save
) and put
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js"></script>
in the application.html.erb
score:1
If you are using npm
npm install moment chartjs-adapter-moment --save-dev
in your files
import { Chart } from 'chart.js'
import 'chartjs-adapter-moment';
score:8
You have to use the bundle version of Chartjs that already include Moment.js
<script src="https://cdn.jsdelivr.net/npm/chart.js@2.9.3/dist/Chart.bundle.js"></script>
score:16
I had this same issue and attempted Kevin's solution, but it did not work. I found that it was necessary to place the moment script before the chartjs script and regardless of the versions I used, that solved the problem for me.
score:29
It turns out, the solution entails version controls (here is what I used):
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.3/Chart.min.js"></script>
Source: stackoverflow.com
Related Query
- Chartjs displays numbers not time
- showing tooltips all the time in chartjs 2.4 not working
- How do I add time sourced from an external source as an X axis to a ChartJS graph?
- ChartJS shows date, but not time, when displaying labels in time axis
- Chartjs not working with d3 from csv source
- ChartJS not displaying time data using Moment.js
- Chartjs does not show annotations when x axis is of type time
- ChartJS not showing data for time series bar chart
- Multiple ChartJS scripts are not working at the same time
- ChartJS time axis not plotting correctly | getting an hour instead of date
- Object.values not seperated by parentheses / Chartjs only displays first element of array
- My Chartjs is not updating after setstate full code attached Reactjs Update
- 'require is not defined' error when attempting to use chartjs in javascript code
- ReferenceError: Chart is not defined - chartjs
- ChartJs title not showing
- how to plot multiple time series in chartjs where each time series has different times
- ChartJS canvas not displaying rgba colors in IE, Safari and Firefox
- react-chartjs-2 with chartJs 3: Error "arc" is not a registered element
- TimeSeries scale in ChartJS 3.0.2. brings error "This method is not implemented: either no adapter can be found or an incomplete integration was ..."
- show label in tooltip but not in x axis for chartjs line chart
- chartjs + Angular6 is not showing charts or any error
- ChartJS show gaps in time data
- chartjs height does not follow parent container
- Chartjs time plot xAxis shows year 1970
- Category scale on Y-axis and time on x-axis in bubble chart in Chartjs
- ChartJS bar not showing up for simple data points
- AutoSkip: False not working on time xAxes labels
- ChartJS vertical line not removed on touchend
- Chartjs not rendering chart and no error thrown
- ChartJS is not rendered
More Query from same tag
- Adjust legend element alignment for chart.js
- ChartJS: line graph with labels on the y-axis
- Primefaces charts replaced by chartJS?
- React passing a variable object to setState vs. an anonymous object to setState
- Chart.js showing different graphs with select
- Position Label under the Horizontal Bar
- How can i change a numpy.ndarray to point format with curly brackets - Python 3.7
- Set height of chart in Chart.js
- Chart.js v3: How can I grow fontsize of legend of my graph?
- Google Pie Chart Is Not Responsive
- How to use plugins in chartjs and laravel chart consoletvs/chartsjs
- ChartJs bar not showing up
- Chart.js Bar Chart - grouping and mapping data
- Grabbing the title in plugin for ChartJS
- chart.js - link to other page when click on specific section in chart
- How to make bootstrap 4 column height the same as row height
- My Chart.js Options referencing React state are being ignored
- Can I use a variable as index in for loop in python?
- Two chart for the same set of data - Chart.js
- How to use images as key for chart.js legend
- Legend isnt moving to the right on my doughnut chart created with chart.js
- Chart Js flickering or switching as i move mouse on canvas
- Accessing conditionally rendered canvas element in React for plotting
- Changing chart options dynamically in Chart.js
- Chart.js Pie Chart
- ChartJS - Injecting data from the server-side
- In ChartJS how do I change the color of a label in the legend?
- Mixed chart not showing both charts simultaneously chart.js
- responsive = false not working
- How to display timestamped data with PrimeFaces and ChartJs?