score:0
It's not a solution really, but I solved it by adding just the description inside the label...
label: "Label 2 - Description",
score:1
You should go:
var options = {
tooltipTemplate: "<%= label + '-' + %> <%= description %>"
};
score:2
Charts doesn't support this feature officially. But you can customize tooltip with your data like this in case of LineChart.
first, make chart with datasets and options
var chart = new Chart(ctx).Line(dataset, opt);
and, add properties what you want show in tooltip
var points = chart.datasets[0].points;
for (var i = 0; i < points.length; i++) {
// Add properties in here like this
// points[i].time = '2015-04-23 13:06:24';
}
then, you can use these properties like this.
tooltipTemplate: "<%=time%> : <%=value%>"
I hope this is helpful to someone. :D
Source: stackoverflow.com
Related Query
- Displaying custom dataset properties in tooltip in chart.js
- ChartJS New Lines '\n' in X axis Labels or Displaying More Information Around Chart or Tooltip with ChartJS V2
- Chart JS custom tooltip option?
- chart.js scatter chart - displaying label specific to point in tooltip
- Chart JS custom tooltip not showing
- Chart.js v3: Tooltip callback doesn't identify clicked dataset of stacked bar chart
- Chart.js: adding a custom label to each item, and displaying it with a custom tooltip
- nnnick chart.js - Custom Tooltip on Line Chart
- Adding additional properties to a Chart JS dataset
- Custom tooltip callback on one dataset (chartjs v 2.5)
- ChartJS add custom tooltip to a stacked bar chart
- Charts JS: Doughnut chart and hiding tooltip for specific data index within each dataset
- ChartJS: Custom tooltip always displaying
- chartjs - How to access chart instance in a custom tooltip callback
- ChartJs (ver: 2.8.0): Custom tooltip does not hide if clicked (or mouse pointer is moved) outside the chart canvas area
- Charts.js - How to set custom tooltip text for each dataset
- Trying to create a custom tooltip in a doughnut chart using chartsjs, but it is not working
- Chart JS attempt to stacked bar chart tooltip for only one dataset
- Chartjs custom colors not displaying when dataset is changed
- How to disable a custom tooltip for a dataset in Chart.js line chart?
- Chart js custom single tooltip not working
- How to access custom property in dataset object in Bar Chart in React ChartJS 2?
- Custom dataset object not setting chart.js bar chart colors in Angular 6
- Chart.js - How to set a line chart dataset as disabled on load
- JavaScript Chart.js - Custom data formatting to display on tooltip
- How to disable a tooltip for a specific dataset in ChartJS
- Chart.js: bar chart first bar and last bar not displaying in full
- chartjs : how to set custom scale in bar chart
- chartjs datalabels change font and color of text displaying inside pie chart
- How to display Line Chart dataset point labels with Chart.js?
More Query from same tag
- High and low points on chart getting cut off
- chart.js.... How to delete the number over the bar?
- Show "No Data" message for Pie chart with no data
- How to keep rounded bar corners when data is filtered chartJs?
- Updating Chartjs Data with Response from POST Call?
- chart.js adjust height in mobile view
- Chartjs - custom y axis range
- Sum array of objects value based on month - ReactJS
- Chart.js: How to change the x-Axes background color?
- How to change format of DateTime reading into chart.js chart?
- How to add a vertical line on Chart.js when hover a point?
- How to get dataset from MySQL using Flask?
- How to format x-axis time scale values in Chart.js v2
- start y-axis from 0 in ng2-charts
- Chart.js not able to re-set data
- PrimeNg bar chart how to show a label for the y-axis
- ChartJS distribute points evenly
- Unregister plugin in Chart.js
- Angular Chartjs How to make it reactive to data change?
- How we embed google analytics chart from google analytic with angular 4?
- How to implement doughnut ChartJS with CodeIgniter 3 and display data from database
- show multiple responsive chart in the same page using chart.js
- Is there any way to show tooltip by default (without hover pie chart) on chartjs
- Pass objects from javascript to Chart.JS through EJS
- How scale sector in doughnut chartjs on hover?
- create a chart.js point dataset from json
- Angular 2 ng2-charts donut change segment color
- How to integrate charts with js and jQuery?
- How to plot Json data in Chart js
- ChartJS Unix Time Values changed