score:16
Accepted answer
It can be done using the maxTicksLimit
option of xAxes, see this working fiddle -> http://jsfiddle.net/Lzo5g01n/3/
xAxes: [{
type: 'time',
ticks: {
autoSkip: true,
maxTicksLimit: 20
}
}]
score:2
For Chart.js 3.3.2, you can use @Kunal Khivensara's approach with a few changes. You can check the documentation. Put ticks
in xAxis
in scales
. Example:
...
options: {
scales: {
xAxis: {
ticks: {
maxTicksLimit: 10
}
}
}
}
...
Source: stackoverflow.com
Related Query
- How do I change the 'months' language displayed on the date axis in Chart JS?
- How to change text colour of specific labels of axis in Chart JS?
- Chart Js change text label orientation on Ox axis
- How to change X-Axis Interval on Chart.js
- Chart js. How to change font styles for "labels" array?
- How to hide the y axis and x axis line and label in my bar chart for chart.js
- how to change Y axis value dynamically based on user input in Chartjs for Line chart?
- Chart.js How to change y axis title position
- How to start the line graph from the left Y axis in a line/bar mixed chart (Chart.js)?
- How to change Chart.js horizontal bar chart Width?
- How to change z-index of chart js tooltip?
- How do I add time sourced from an external source as an X axis to a ChartJS graph?
- Change Axis Line color in Chart created using chart.js
- Chartjs 3.x - How to duplicate X axis on both sides of horizontal bar chart with only 1 dataset?
- How to change the label and grid line position on a timeseries chart in Chart.js 3?
- How to Remove axis Lines from chart in chart js
- How to change color of column in chart js
- How change chart height in chart.js
- angular-chart.js doughnut chart : How do I change width of the arc of a doughnut?
- how to minimize x axis labels to day hours in chart js
- how to label axis within radar chart with chart.js
- How to change fonts and axis labels for Chart.js image rendering with QuickChart?
- chart.js: How do I make the radar chart axis labels bigger?
- How to change axis font in PrimeFaces and Chart.js
- How to change the chart line or area colors according to the user need?
- How to stop axis label from being cut off in chart JS?
- How to change background color of labels in line chart from chart.js?
- How to change default label of each bubble in bubble chart using chartjs-plugin-datalabels
- How to change font weight of footer in tooltips in Chart JS
- How to change chart.js axis labels color?
More Query from same tag
- ChartJS date formating
- Rendering Rails json data in chartjs
- Chart js adding number
- Reusable react component with Canvas doesn't render canvas with its props
- How to scale label size radar chart chart.js
- How can I hide tooltip in Chart.js on a specific data label?
- Apply color only to lower part of Chart.js line chart
- Chartjs dynamic chart return both x & y axis undefined
- Adjust appearance of tooltip in lien chart rendered by Chart.js
- How does chart updating works within the context of react?
- Displaying the first value of the array in datasets.label Chartjs
- Chart.js not stretching width as per data
- Protractor - Get array from canvas attribute in Angular2 using ng2-charts/Chart.js
- How can I tighten letter spacing on labels with ChartJS?
- Add horizontal Line to my chart.js Barchart
- Doughnut chart updates with twice the data
- ChartJS doesn't draw the chart
- Chart.js custom plugin before destroy
- Chart.js Bar graph with percentage values
- Chart.js doughnut text colors
- Can you change legend style for bar datasets with chart.js?
- Parsing values from external JSON file with Chart.js
- Chart.js noob - Can't get anything to display
- Always display ChartJS custom tooltips
- Canvas displays initially in Chrome but not in Firefox
- Adding a second custom tooltip for charts in ChartsJs
- ng2-charts tooltip and legend stopped working
- generate basic pie chart using chartjs
- ChartJS number shows up on top of number
- How to integrate basic ChartJs customizations when using react-chartjs-2?