score:0
Accepted answer
you should change the options for to xaxes of your chart.
const chart = new chart(ctx, {
type: 'line',
data: data,
options: {
scales: {
xaxes: [{
ticks: {
callback: function(value, index, values) {
return math.round(value).tostring();
}
}
}]
},
tooltips: {
callbacks: {
title: function(tooltipitem, data) {
return data.labels[tooltipitem[0].index];
}
}
}
}});
i think that this won't change the dataset.
Source: stackoverflow.com
Related Query
- How do I change the 'months' language displayed on the date axis in Chart JS?
- How to change the display of an axis Chart.js
- How to hide the y axis and x axis line and label in my bar chart for chart.js
- How to display the labels in doughnut chart using ng2 charts?
- How can I display the xAxes and yAxes data in the tooltip, Chart JS?
- How to start the line graph from the left Y axis in a line/bar mixed chart (Chart.js)?
- How to change the label and grid line position on a timeseries chart in Chart.js 3?
- angular-chart.js doughnut chart : How do I change width of the arc of a doughnut?
- chart.js: How do I make the radar chart axis labels bigger?
- How to change the chart line or area colors according to the user need?
- how to change display and styles of the labels in react-chartjs-2
- How to style a pie chart in chart js? I want to change the border color, border width and give them shadow
- How to change color by clicking on the chart bar?
- Chartjs - how to change the notation of doughnut chart
- How can I change the cursor on pie chart segment hover in ChartJS 3?
- How to show tooltip value of all data falling on the same axis in chart js?
- Chart.js How to sum the values in a pie chart and display them in the header
- How to change the color of y axis labels in different color in Chart.js
- How to change text colour of specific labels of axis in Chart JS?
- How to display the values inside the pie chart of PrimeNG (chart) using JavaScript or Angular
- How do I change the grid line style on the Y axis in Chart.js?
- How to remove the extra Y axis from a bar chart in chart.js
- How to display labels outside the pie chart border?
- How can I display `Null` value data on Y Axis using the Primitive dataset format in Chart.js V3.7.0?
- How do i have a single Chart.vue component instead of different chart components and then display charts from it by changing id of the API
- How to change the position of the tooltip for the Bar type chart in Chart.Js
- How to add custom text inside the bar and how to reduce the step size in y axis in chart js( Bar chart )
- How to Change the Y axis of an Primefaces 7.0 ChartJS Linechart with Java?
- How can I change the background colors of a bar chart after it has been created?
- I am using chart js to draw a chart. I did everything right but i don't know why the x axis and y axis label is not comming in chart. code below
More Query from same tag
- ChartJs - Double tooltip Top and Bottom on hover
- Chart.js - How to push a collection of array into dataset
- Chart.js doughnut chart comes bigger and bigger
- Chartjs chart not rendering with pug template
- Need to put border on variablepie highchart?
- How to make data always visible on bars Chart.js
- How to Display Chart.js line-chart from a MVC Controller
- chart.js with JSON Data on Same page not displaying
- keep 2 chart.js contained in a div
- trouble with legend on chartjs
- Y-axis scale uneven
- Chart.js label value
- How to set a time scale to a ChartJS chart from JSON?
- Execute SQL prepared statement in AJAX
- Chartjs Percents in Legend
- use ng2-charts with a loader and AfterViewInit
- Chart.js - Where do I find which components should be registered?
- d3.csv parseFloat will not parse correctly
- Age pyramid chart using chart.js
- Remove moment from chartjs in angular app
- chart.js set one bar as different colour?
- How can I change the legend label without affecting my tooltip label?
- Mobile page loading in "zoomed" state
- Chart.JS customization - how to debug?
- Realtime chart JS in Java obtaining the data from a sensor ;Chart.js: Failed to create chart: can't acquire context from the given item
- How to load page containing Chart.js using jQuery
- chartjs plot datetime value with time offset on the grid
- Why doesn't my donut chart, created with Chart.js, appear?
- How to install Chart.js and angular-chart.js (Error: Chart.js library needs to be included)
- chartjs datalabels not showing anything with django template