score:7
Accepted answer
this can be done using the major ticks option in chartjs.
scales: {
xaxes: [{
type: 'time',
time: {
unit: 'hour',
stepsize: 3, // i'm using 3 hour intervals here
tooltipformat: 'hh:mm',
},
ticks: {
major: {
enabled: true, // <-- this is the key line
fontstyle: 'bold', //you can also style these values differently
fontsize: 14 //you can also style these values differently
},
},
}]
}
this produces an x axis like the follwong
Source: stackoverflow.com
Related Query
- Chart.js hours scale show day switch
- how to minimize x axis labels to day hours in chart js
- chartjs show 24 hours in line chart
- chart js - bar chart with time scale on Y axis in Hours and Minutes
- Chart.js Show labels on Pie chart
- How to prevent first/last bars from being cut off in a chart with time scale
- chart.js: Show labels outside pie chart
- ChartJS - Draw chart with label by month, data by day
- Chart.js how to show cursor pointer for labels & legends in line chart
- chartjs : how to set custom scale in bar chart
- show label in tooltip but not in x axis for chartjs line chart
- chartjs show dot point on hover over line chart
- Chart JS Show HTML in Tooltip
- Chart Js Negative Scale
- chart js tooltip how to control the data that show
- How to show percentage (%) in chart js
- Show X axis on top and bottom in line chart rendered with Chart.js 2.4.0
- Chart looks only grey, does not show the color - Chartjs,discordjs
- Chart JS show multiple data points for the same label
- Show data dynamically in line chart - ChartJS
- Category scale on Y-axis and time on x-axis in bubble chart in Chartjs
- chart.js switch x/y axis on line chart
- Chartjs - show elements in all datasets on hover using bar chart
- Remove the label and show only value in tooltips of a bar chart
- Chart Js Show the old data on mouse hover
- set y-axis scale manually in a bar chart using angular-chart.js
- ChartJS: Show all labels of a mixed chart in the tooltip
- Show all values in Chart js y axis
- PrimeNg bar chart how to show a label for the y-axis
- impossible to remove scale from radar chart (chart.js)
More Query from same tag
- Chartjs is not showing charts in my Django project
- How to embed php code in min.js file
- jquery load with chart.js
- Chart.js Bar Chart: How to remove space between the bars in v2.3?
- How do I set a bar chart to default to a suggested maximum in chart.js v1.01?
- How to load new chart (chartsjs) from api call with jquery?
- Chart.js chart.update() method is not doing anything
- undefined labels piechart - chartjs
- charts.js Stacked Bar Graphs - selecting row and dataset selected
- Mixed Chart calculating difference between two bars - ChartJS
- How to align multiple x axes in chart.js?
- Bollinger bands in React application with a library
- Adding hours and minutes to a date object for time axis
- how to add a background that display "no data" on Canvas using ChartJS?
- Charting with chartjs, can't get it working correctly
- chart.js how to display max value?
- trouble passing API result to chart
- Chart.js : How to get a line created by sum of others line?
- Chart.js canvas cuts off doughnut stroke
- Angular6 and ng2-charts does not display any charts when i fill data from webservice
- ChartJS separate charts per JSON object, and not when hovered over
- Building a 24h visualisation with chartjs
- Changing cursor to pointer on Chart.js bar chart when hover (mousemove) event is disabled?
- Remove Chart.js Gridline Overlap
- ChartJS with dates on the X axis not displaying any graph
- Copy div content to dynamically create a modal window:possible?
- ChartJS not work in .php loaded by jquery .load() (AJAX)
- chart.js - Disable labels
- Hide min and max values from y Axis in Chart.js
- Chart JS can't access data from array within an object