score:0
Accepted answer
this is because you are using v2 syntax by trying to configure the title in the scalelabel
option. in v3 these options have been moved to the title
namespace in the scale:
new chart('websitecalls_chartel', {
type: 'line',
data: {
labels: ["sa", "so", "mo", "di", "mi", "do", "fr"],
datasets: [{
data: [0, 0, 0, 0, 0, 0, 0],
}]
},
options: {
scales: {
x: {
title: {
display: true,
text: 'x title',
font: {
weight: 'bold'
},
}
},
y: {
title: {
display: true,
font: {
weight: 'bold'
},
text: 'y title'
}
},
}
},
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/chart.js/3.7.1/chart.js"></script>
<canvas id="websitecalls_chartel" height="80"></canvas>
Source: stackoverflow.com
Related Query
- 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
- How to Draw Gantt chart using chart js or other libraries
- Draw a horizontal bar chart from right to left
- how to draw line graph with line animation from left to right using chartjs?
- How to draw outer labels for polar chart using ng2-charts and chart.js at fixed positions outside the rings?
- How to draw multiple color bar in a bar chart using chart.js
- Labels (category type) on left and right of bar chart using chart.js?
- Why is this bar chart using chart.js not rendering in react.js?
- I am using chart.js I sent my time values throw my api as timestamp know i need to show them in the chart as date format
- Can't Draw Horizontal Line on Graph Using ChartJS Annotation Plugin and Primevue Chart
- Why is my line chart using multiple lines to connect random points? (Chart.js)
- How to draw multiple color bars in a bar chart along a Horizontal Line using chart.js
- How to export Chart.js chart using toBase64Image, but with no transparency?
- Can't draw pie chart using chartjs - TypeError: Cannot create property '_meta' on number '16'
- Chart.js - Why the chart cannot rendered in a child component but in the father component can?
- Trying to create a custom tooltip in a doughnut chart using chartsjs, but it is not working
- How to Draw a line on chart without a plot point using chart.js
- How to draw a chart like below using chart js
- how to draw Line chart using chart.js and datalabels should be shown
- Pie Chart using chart.js not showing up but bar charts are?
- Draw stacked horizontal bar chart with Average line using ChartJS
- My chartJS axios.get is fired twice causing chart to render twice too and i don't know why. I'm using react-chartjs-2
- How to run Chart.js samples using source code
- Draw bubbles to show details in line chart using chart js
- Unable to Draw Chart using ChartJS
- How to use canvasjs to draw column chart using text data
- Draw Line Chart Using Chart.js
- How to pass Arrays from backing bean to JavaScript to draw a chart using Chart.js in an Ajax call
- How to add text inside the doughnut chart using Chart.js?
- Converting Chart.js canvas chart to image using .toDataUrl() results in blank image
More Query from same tag
- y-axis values are way to high
- Chart.js padding canvas
- Vue ChatJS redirect on pointer click
- Chart.js draw mathematical function
- the graph in the view is not displayed - Chart.js Angularjs
- chart.js legend not working for pie chart
- Chart.js sciptable options: accessing the values of the data object?
- drawing line chart with chartjs
- chartjs: How to remove specific label
- Change the graph from 1 Day to 15 mins when it is being loaded for the 1st time in ChartIQ
- I can't change the color of the grids in Chart.js
- Updating Chartjs Data with Response from POST Call?
- Chart.js, PHP and JSON loop issue
- Create IF to change chart.js bar color
- Change Legend Box Outline Chart.js 2
- Y axis set custom value using chart.js
- Chart.js bars have non uniform widths
- Adding an additional datasets to chartJS
- Can't make chart js responsive
- Using chart js options with react-chartjs-2 and typescript
- Chart.js 3.x custom positioners: cannot use them in TypeScript
- How to customize horizontal bar in chart.js?
- Embed unique identifier in Chart.js segments?
- Is there any way to remove extra space and Horizontal line from Bar chart of Chart.js?
- Does this library have a way of showing a world map?
- How to display data with percentage from database in pie chartjs?
- JsChart multiple labels in legend
- How to make a child component of a sibling component refresh when a button is pressed in ReactJS?
- Chartjs 2 Line Graph Single Stroke Between Datasets
- Chartjs barchart group dataset by label