score:6
Accepted answer
From the official docs:
Labeling Axes
When creating a chart, you want to tell the viewer what data they are viewing. To do this, you need to label the axis.
The scale label configuration is nested under the scale configuration in the scaleLabel key. It defines options for the scale title. Note that this only applies to cartesian axes.
You can add labels for both axes but in your case, since you only need it on the x-axis
, your chart options
should look similar to this.
var options = {
scales: {
xAxes: [
{
scaleLabel: {
display: true,
labelString: 'Party size',
fontColor: '#C7C7CC',
fontSize: 11
}
}
]
}
};
Source: stackoverflow.com
Related Query
- Chart.js, adding footer to chart
- Adding trendlines to existing chart Chart.js
- Adding Chart.js line chart to Jinja2/Flask html page from JS file
- Adding a label to a doughnut chart in Chart.js shows all values in each chart
- Adding custom text to Bar Chart label values using Chart.js
- chartjs Adding percentages to Pie Chart Legend
- Adding line over stacked line chart with ChartJS
- Adding object data to data structure of chart.js chart does not show any data
- How to change font weight of footer in tooltips in Chart JS
- ChartJS chart not scaling after adding values
- Adding data to line chart using addData() method in Chart.js
- ChartJS 2 - Adding data to chart breaks after X number of items added
- Adding additional properties to a Chart JS dataset
- Need help adding Chart.js chart to a Modal window (I'm Using AngularJS)
- what is wrong with my code ? java script chart position
- How to print a chart rendered by code
- ChartJS chart is bugged after adding new data
- Adding image on chart js
- Adding label inside multiseries doughnut chart through chart.js
- VueJS + Chartjs - Chart only renders after code change
- Adding responsive text inside chart in Charts Js
- How do I destroy/update Chart Data in this chart.js code example?
- Chart js adding number
- Adding new data to empty Chart.js chart does not render new data correctly
- getting additional value fields from data source for dx.chartjs doughnut chart
- 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
- Problem adding name to X-axis for a chart
- Adding vertical and horizontal scroll to Chart js Bar graph
- Adding condition in ComponentDidMount to display chart data
- Chart js footer
More Query from same tag
- Need some Help Regarding Chart.js
- How to return two lists to chartjs from Django View
- chart.js not accepting data in dataset which stored in local storage
- Is there a way to display legend's data over the chart in chart.js?
- Datalabels plugin throws error when using scriptable option
- How to add new x axis in chart JS?
- Color by point in ChartJS.Blazor
- Chart.js 2.0 - Tooltip is showing incomplete data on hover
- ChartJS in Datatable cell performance
- Chart.js: bar chart first bar and last bar not displaying in full
- Html chart does not fit a small Android WebView
- chart.js 2.0 add new property to dataset
- getElementById on element from parent component returns null, when called in ngAfterViewInit() of child component
- Chart JS dataset disabled by default
- How to use HTML in custom tooltip in angular charts?
- Chart.js load new data
- React Chartjs 2 display axes above datasets backgroundColor
- Labeling and Data (ChartJS)
- VueJs and ChartJs - Chart is responsive in width, but not height?
- How to create a charts in Razor Pages pulling data from the database?
- Defining y-starting point for floating horizontal bar charts in Chart.js?
- Color the bars using Angular-Chart.js
- Chart.js not drawing on mobile (safari/chrome) fine on desktop
- Chart.options returns "Property 'options' does not exist on type 'chart'"
- Can't reuse a template in Vue.js
- Chart.js: A value is empty, but the line must not be broken
- How to update chart.js chart with new data?
- tc-angular-chartjs problems while assigning value to chart-data
- chartjs default background color to columns
- update charjs dataset using react library