score:0
you could define xaxes.ticks.stepsize: 10
as follows:
options: {
scales: {
xaxes: [{
ticks: {
min: 1,
max: 45,
stepsize: 10
}
}]
}
}
please consult the chapter tick options from the chart.js documentation.
score:0
found the answer.
you can do
const xvalues0 = array.from({length: n}, (_, index) => index + 1);
const xvalues = xvalues0.map(x => x * (timeinterval/(1000*60)));
Source: stackoverflow.com
Related Query
- Dynamically update values of a chartjs chart
- How to format x-axis time scale values in Chart.js v2
- How to prevent first/last bars from being cut off in a chart with time scale
- line chart with {x, y} point data displays only 2 values
- chartjs : how to set custom scale in bar chart
- Chart Js Negative Scale
- Chart.js v2.6: Add arrows to pie chart output values
- Display values outside of pie chart in chartjs
- How to display inline values in a stacked bar chart with Chart.js?
- Chart.js Timeseries chart - formatting and missing data values
- Chart js x-axis values getting repeated twice
- Category scale on Y-axis and time on x-axis in bubble chart in Chartjs
- Adding a label to a doughnut chart in Chart.js shows all values in each chart
- Is it possible to revert x-axe values in line chart with chart.js
- set y-axis scale manually in a bar chart using angular-chart.js
- Show all values in Chart js y axis
- impossible to remove scale from radar chart (chart.js)
- Chart JS: Ignoring x values and putting point data on first available labels
- Adding custom text to Bar Chart label values using Chart.js
- How to show data values in top of bar chart and line chart in chart.js 3
- Show point values in Radar Chart using chart.js
- Hovering over chart.js values in Meteor onRendered function causes chart axis shift
- How to pass values to a chart (chart.js / morris.js)
- How to commaize the data values provided to a chart in Chart.JS?
- Chart js logarithmic line chart showing NaN values instead of null
- Chartjs - Donut Chart label for small values not visible
- chart is not getting updated from the values it received from Jquery
- Chart.js stacked bar chart - sorting values in bar by value
- how can i modify scale labels in angular chart js?
- Equal distance grouped bar chart irrespective of scale - chart.js
More Query from same tag
- ChartJS Annotations display custom label
- ng2-charts tooltip and legend stopped working
- Secondary bar with chart.js
- assigning line chart data in chartjs
- Chart, X and Y-Axis labels are blurred in horizontal bar chart using chart.js
- bootstrap ui+angular chart: is it possible to disable graph's auto refreshing?
- How can I add an event to chart.js legend?
- How to make animated bar graph with canvas?
- ChartJS onclick fill area (Radar Chart)
- Execute onClick function on Custom Legend
- how to modify and make labels box width fixed without changes of chart.js
- Chart.js 2.0 - vertical lines
- Pass data to Chart Js Laravel
- Chart.JS custom y axis labels with text that has value
- ChartJS: Chart not displaying full range of data
- How to push an array into an Object which is inside of another array?
- Show Labels on Pie pieces instead of Data values Chart.js
- Displaying labels on a Doughnut Chart using Chart.js
- How to create a stacked graph using ChartJS
- Default font size doesn't change ChartJS
- Chartjs is disappearing in Ionic tabs when keyboard dismiss
- Chart.js maxBarThickness is deprecated in angular 8
- Chart.js: How to calculate the labelOffset based on the distance between ticks?
- Error: [$injector:unpr] Unknown provider: chart.jsProvider
- How to work out Chartjs using TypeScript with Chartjs.definitelyTyped from github
- How to align bars in bar chart - Chart.js
- Adding a line break in Chart.js (2.7.2) labels section
- Creating multiple canvas patterns fails
- Creating a heart rate monitor
- Disable chartJS tool tip on one dataset only