score:12
Accepted answer
In the title text property, you can pass in a string array and each item will break onto a new line.
text: ['Title','Subtitle'],
Here is a working example.
score:-1
Try this example:
Highcharts.chart('container', {
chart: {
marginTop: 80
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
subtitle: {
text: 'This text has <b>bold</b>, <i>italic</i>, <span style="color: red">coloured</span>, <a href="http://example.com">linked</a> and <br/>line-broken text.'
},
series: [{
data: [0, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
}]
});
<script src="https://code.highcharts.com/highcharts.js"></script>
<div id="container" style="height: 400px"></div>
score:2
For anyone still interested in this I've made a simple subtitle plugin: https://www.npmjs.com/package/chartjs-subtitle https://github.com/jeredmasters/chartjs-subtitle
This lets you have different styling compared to the primary title
Source: stackoverflow.com
Related Query
- Chart.js wont display normal chart
- Display line chart with connected dots using chartJS
- Chart js display empty plot
- How to display Line Chart dataset point labels with Chart.js?
- Display values outside of pie chart in chartjs
- How to display value of only one datapoint in line chart
- Problem for display a chart with Chart.js and Angular
- How to display inline values in a stacked bar chart with Chart.js?
- Chart.js Subtitle won't display
- Display a limited number of labels only on X-Axis of Line Chart using Chart.js
- Display Doughnut Pie Chart As Circle Progress Chart.js
- How to display data labels outside in pie chart with lines in ionic
- How to display the labels in doughnut chart using ng2 charts?
- ChartJs line chart - display permanent icon above some data points with text on hover
- How can I display the xAxes and yAxes data in the tooltip, Chart JS?
- Chart JS display Data Value on the top of the Bar
- Display Date Label in axes - chart js/ng2 charts
- ChartJS - how to display line chart with single element as a line? (not as a dot)
- Display labels on bar chart using Chart.js
- Display Chart.js chart in Node.js
- Chart.js chart does not display when inside an ngIf.
- Beginner using chart.js: having trouble display state full of data into a column chart using variables
- Display Time In Y Axis - Bubble Chart
- ChartJS horizontal chart display legend on each bar
- Chart.js version 2.2.1 wont show chart
- ChartJS : How to display two "y axis" scales on a chart
- how to display chart data as html table chartjs
- Laravel trying to display chart on welcome page
- React component wont re-render ChartJS chart with redux props
- Display data labels on a pie chart in angular-chart.js
More Query from same tag
- Change data onclick with ChartJS
- how to show labels in laravel charts when the name of the label is on another table?
- Reactive charts with Meteor : d3charts , Hightcharts , ChartJS , other?
- How to reach to a chartjs chart's value?
- How to draw 2d line time plot with chart.js
- How to show label at right side of Y axis same as left side of Y Axis ChartJS
- Object.values not seperated by parentheses / Chartjs only displays first element of array
- how to display text information on hover in chart js?
- How to access the Chart object in Javascript DOM?
- Chart.js - Setting x-axis based on user input
- Increase space between legend and chart
- Inline plugin doesn't work
- Bar Graph, chart.js PHP Will Not Load
- Not able to show data on Chart.js
- [Vue warn]: Error in mounted hook: "TypeError: this.$refs.canvas is undefined"
- Update chartjs chart within random data once per second
- Chart.js: Truncate Legend's Labels
- Use Chartjs-Annotation-Plugin without using "import"
- Chart doesn't render in angular 2 app
- Displaying a chartjs chart within a bulma full height hero
- how to show only each 15th x-labels in line chart chart.js in angular 6?
- Android WebView HTML5 canvas error
- How to add an offset to a dataset in Chart js
- ChartJS – Set baseline above zero
- How to noshown the scale while all datasets is hidden (chartjs)?
- ChartJS, Disable Tooltip for one plot on a multi graph data
- chart.js uncaught reference error while updating
- How to display chart in android tv using web view(chart.js)
- Updating chartJS with dynamic data
- Growing chart value - chart.js