score:1
Accepted answer
i think it's the way you are trying to do the axis, its looking to show the values between 00-01, 01-02 etc, in the last data point your axis doesn't go to 1am, and the first data point is similar, i was able to fix it by changing:
min: moment.unix(new date(2018, 1, 0, 0, 0, 0).gettime() / 1000),
max: moment.unix(new date(2018, 1, 0, 0, 60, 0).gettime() / 1000),
to:
min: moment.unix(new date(2018, 1, 0, 0, -1, 0).gettime() / 1000),
max: moment.unix(new date(2018, 1, 0, 0, 61, 0).gettime() / 1000),
might not be exactly what you want but in the fiddle (after adding moment.js as a dependency) it doesn't cut off your bars.
i haven't worked with time like this, but maybe the data supplied needs to be different to get it to work.
Source: stackoverflow.com
Related Query
- How to keep side bars in Chartjs bar graph from clipping?
- Chart.js Bar Chart - how to chart bars from 0
- ChartJs how to get from mulitiple dateset which dataset bar is clicked
- ChartJs bar chart - keep bars left instead of equally spread across the width
- How to remove bars for those bars with zero value in Chartjs bar chart?
- How do I add time sourced from an external source as an X axis to a ChartJS graph?
- Some bars of the bar graph are disappearing from Chart.js
- How to set the chartjs bar graph scale to the highest value in the result data
- How to hide/show bars differentiate by a colors and by click on labels, using chartjs bar charts?
- chartjs 2.7 how to add labels in center of horizontal bar graph
- ChartJS line chart or bar graph from a Java program
- How to prevent empty bars from taking up width in Chart.js bar chart
- how to insert dynamic data from sql into chartjs stacked bar chart javascript
- How to make labels on both side from horizontal bar chart js
- How to get the image from graph created using chartjs
- How to create rounded bar graph with Angular 7 and Chartjs (v2)
- How to Push data dynamically from firebase to bar graph in angular
- Chart.js Bar Chart: How to remove space between the bars in v2.3?
- How to prevent first/last bars from being cut off in a chart with time scale
- How to modify bar width in Chartjs 2 bar charts
- How to create rounded bars for Bar Chart.js v2?
- chartjs : how to set custom scale in bar chart
- How to change the cursor to a pointer when I hover over a bar in a ChartJS bar chart?
- How to have solid colored bars in angular-chart bar chart
- How to use 'time' (data from database, data type: timestamp ) for plotting graph in Chart JS
- Create a rounded bar graph with Angular and chartJS
- How to set a full length background color for each bar in chartjs bar
- Gradient color for each bar in a bar graph using ChartJS
- How to draw Horizontal line on Bar Chart Chartjs
- How to work out Chartjs using TypeScript with Chartjs.definitelyTyped from github
More Query from same tag
- JavaScript implementation doesnt work (Chart.js)
- How to make a Chart.js Bar chart stay in its place
- Chartjs line graph goes over panel
- $(...).getContext("2d") is not a function when using chart.js
- ChartJS How to set max labels for X axis?
- Multiple Chart.js Charts in Partial Views Overwriting Each Other
- Chart.js: stack the bars to the left
- How can I get the active label element on click in ChartJS?
- ChartJS 2.7.3 stacked bar chart with overlap
- Javascript : ""Uncaught TypeError: Cannot read property 'x' of undefined"" in canvasjs.min.js
- Can't update chart
- How do I increase the space between the Legend and the Chart when using angular-chart.js?
- chart js tooltip how to control the data that show
- Chart.js line from annotations plugin is not appearing
- How to make lines in line charts from ng2-charts straight lines?
- Chart.js graph with just two cordinates
- Chartjs with zoom plugin zooms too much with wheel just with single turn
- Using Chart.js with Dates as x-Axis labels
- The 3rd dataset not showing in canvas
- Issues with ng2-charts
- How to update a react-chartjs-2 plot using useState()
- How do I correctly include Moment.js and Chart.js with RequireJS when I want to create charts with time scales?
- In which stage of the program do I remove my legend labels in charts.js?
- Chart.js PolarArea not able to chance arc width and color
- Why i lost my chart.js when i do a new render
- ChartJS update chart with multiple datasets
- Angular canvas is undefined
- How can I set the category height of a horizontalBar chart?
- chart.js random weird problems
- How do I use Chart.js and Bootstrap at same time? (various jQuery versions)