score:0
you can add isoweekday: true
into time
config
https://www.chartjs.org/docs/latest/axes/cartesian/time.html
score:1
you should modify axis settings to set max and min value (start-end date range probably). an example (nb! use your own required formats):
time: {
unit: 'month',
displayformats: {
month: 'mm'
},
max: moment(data.end_date).format('mm'),
min: monent(data.start_date).format('mm')
}
score:3
i realize i'm super late on this, but maybe you should try setting the distribution
option to series
. see the documentation here:
scale distribution
the distribution property controls the data distribution along the scale:
'linear': data are spread according to their time (distances can vary) 'series': data are spread at the same distance from each other
this should fix that weird formatting that you have where the spacing is all mucked up.
Source: stackoverflow.com
Related Query
- Chart JS - set start of week for x axis time series
- Chart.js - changing tick / label positions for x axis time series
- How do you set x and y axis and Title for a line chart using charts.js?
- ChartJS not showing data for time series bar chart
- How to set 3 axis in google chart (V-Axis Left as Qty, V-Axis Right as Series Column and H-Axis as TimeOrder)?
- Chart.js 2.9.4 - howto set a margin for axes min\max and time axis label separation
- How to start Y Axis Line at 0 from right for negative values in chart js 2?
- Chart for Real time data with duplicate x axis
- How to set max and min value for Y axis
- In Chart.js set chart title, name of x axis and y axis?
- Chart JS - Use time for xAxes
- show label in tooltip but not in x axis for chartjs line chart
- ng2-charts: How to set fixed range for y axis
- time series stream, removing am/pm on x axis and 24 hour format
- Chart.js Dynamically Updating Chart with X Axis Time
- How to hide the y axis and x axis line and label in my bar chart for chart.js
- Chart js different background for y axis
- how to set chart.js grid color for line chart
- Chart.js v3.x time series on x axis
- How to start the line graph from the left Y axis in a line/bar mixed chart (Chart.js)?
- Time series line chart is not displayed
- Time Series Line chart js in react not working
- How do I add time sourced from an external source as an X axis to a ChartJS graph?
- Display Time In Y Axis - Bubble Chart
- Minimum value for x Axis doesn't work for horizontal bar chart | ChartJS
- Chartjs - Set start and end value into a Bar Chart
- Adding a Date adapter for Time Cartesian axis from a cdn
- How to use set the color for each bar in a bar chart using chartjs?
- Chart Js reduce text size for label on X axis
- How to set the xAxes min and max values of time cartesian chart in Chart.js
More Query from same tag
- AJAX request not working unless alert() is used
- chart.js how to force min and max y axis values
- Customised tooltip in chart.js
- is there a way to do automatic scrolling?
- Chart.js create line graph using dates in the x-axis that reflect real time intervals (not evenly distributed)
- Pie chart isn't loading, but the labels are
- Angular 10 - Chart.js to draw chart in Array with convas id on runtime
- Where is the appropriate place to instantiate a javascript widget/chart/utility when using angular.js?
- space before and after data points in chart.js
- Uncaught (in promise) TypeError: Cannot read property 'length' of undefined in chartjs with Vuejs
- Using Charts.js with react
- chart.js legend not working for pie chart
- My chart won`t live update - done in Chart.js and Java Script
- Struggling with dynamic data
- Graph Chart.js dropdown menu - chart rendering
- how to display large number of data points
- Secondary bar with chart.js
- ChartJS with AngularJS - Canvas won't display anything
- ChartJS: Translate x axis month to other languages
- How to use same data / labels on two y axes in Chart.js
- How to skip x Axes labels in ChartJS
- Add data to line chart using chart.js
- Chart.js How to align two X-axis in bar chart?
- Linear gradient width using percentage (%) instead of pixels (px)
- How to select context or scale on chart in chartjs quickchart io to run getValueForPixel?
- System.Collections.Generic.List`1[System.String] instead of data
- If date not in queryset add default value
- How to use chartjs-plugin-annotation in Angular
- Chart JS Dynamic number of datasets
- Change Chartjs financial chart yaxis from left to right