score:2
Accepted answer
you can use a custom label formatter to display custom values instead of numbers.
values = [
"3:00 am",
"7:00 am",
"11:00 am",
"3:00 pm",
"7:00 pm",
"11:00 pm",
]
public scattterchartoptions: chartoptions = {
responsive: true,
scales: {
xaxes: [{ticks: {
callback: value => this.values[value]
} }],
}
};
similar example: https://stackblitz.com/edit/ng2-charts-bubble-template-g4tbyk
Source: stackoverflow.com
Related Query
- ng2 scatter chart how to put labels in x axis
- How to display the labels in doughnut chart using ng2 charts?
- how to minimize x axis labels to day hours in chart js
- chart.js: How do I make the radar chart axis labels bigger?
- Inverting X axis number labels in chart.js scatter chart
- How to change text colour of specific labels of axis in Chart JS?
- How do we put labels on pie chart arcs - chart.js/vue-chart.js
- ChartJS New Lines '\n' in X axis Labels or Displaying More Information Around Chart or Tooltip with ChartJS V2
- Chart.js how to show cursor pointer for labels & legends in line chart
- How to put rounded corners on a Chart.js Bar chart
- How to display Line Chart dataset point labels with Chart.js?
- How to wrap X axis labels to multi-lines (X axis label formatting) in ng2-Charts?
- How do I change the 'months' language displayed on the date axis in Chart JS?
- Changing x axis labels in Chart.js line chart
- How to display data labels outside in pie chart with lines in ionic
- Line chart with large number of labels on X axis
- How to align Chart.JS line chart labels to the center
- How to access labels array using chart plugin (Chart.pluginService.register) in Chartjs 2.x?
- How to hide the y axis and x axis line and label in my bar chart for chart.js
- Chart.js Radar Chart How to Remove Outer Labels
- How to start the line graph from the left Y axis in a line/bar mixed chart (Chart.js)?
- How put dataset labels into multiTooltipTemplate?
- ChartJs - Pie Chart - how to remove labels that are on the pie chart
- ChartJS (React) Line Chart - How to show single tooltip with data and labels from 3 (multiple) dataset?
- How to add images to chart labels with vue-chartjs?
- How to draw outer labels for polar chart using ng2-charts and chart.js at fixed positions outside the rings?
- In Chart.js >3.0, on axis of type time, how to show labels and ticks only for existing data points (make labels reflect data)?
- How do I add time sourced from an external source as an X axis to a ChartJS graph?
- How to disable Chart.js Radar Chart point labels
- Chartjs 3.x - How to duplicate X axis on both sides of horizontal bar chart with only 1 dataset?
More Query from same tag
- Chart.js styling questions
- Convert/transpose one array into another in JavaScript?
- Destroying Chart js within useEffect - React
- Interactive chart via ChartJS
- How to add labels for only some of the data point?
- Trouble getting Axis Labels to show up in Chart.js
- React JS Chart JS 2 is not hiding the grid lines in the background
- How to apply data dynamically on initialisation for chart.js in angular?
- Usage of ChartJS v3 with TypeScript and Webpack
- Chartjs - Changing legend as a line with pointsyle of circle?
- Chartjs v2.5 - only show min and max on scale, absolute positioning on scale
- Chartjs: Bar width
- Chart.js dynamically upating data using variable
- multiple charts js in page but with same tooltips (about last chart)
- Vertical line across multiple charts
- ChartJS vertical line not removed on touchend
- Chart.js - Draw charts with opposite bars - How to set both the y-axis ends to positive number?
- How to display large amount of information properly without cramping too much in Chart.js
- Laravel passing orders to Chart.js
- Chart.js: refresh second Y axis step on legend click
- Chart.js line split color
- Chart.JS spacing and padding
- How to show labels above pie chart in chart.js
- Chart.js legend position error
- How to draw 2d line time plot with chart.js
- How to get a value from function javascript and print it to the chart
- addData() dropped from latest chart.js 2.1.3 - whats up?
- how to use chart.js with react Hook?
- Adding space to begin of xAxis ticks in chartJS
- How to force animation on chartjs?