Merge branch 'MDL-84398' of https://github.com/pedrojordao/moodle
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -200,6 +200,7 @@ define([
|
||||
datasets: this._makeDatasetsConfig()
|
||||
},
|
||||
options: {
|
||||
locale: document.documentElement.getAttribute('lang'),
|
||||
responsive: true,
|
||||
maintainAspectRatio: false,
|
||||
plugins: {
|
||||
@@ -307,10 +308,11 @@ define([
|
||||
Output.prototype._makeTooltip = function(tooltipItem) {
|
||||
|
||||
// Get series and chart data to rebuild the tooltip and add labels.
|
||||
const formatter = new Intl.NumberFormat(this._config.options.locale);
|
||||
var series = this._chart.getSeries()[tooltipItem.datasetIndex];
|
||||
var serieLabel = series.getLabel();
|
||||
var chartData = tooltipItem.dataset.data;
|
||||
var tooltipData = chartData[tooltipItem.dataIndex];
|
||||
var tooltipData = formatter.format(chartData[tooltipItem.dataIndex]);
|
||||
|
||||
// Build default tooltip.
|
||||
var tooltip = [];
|
||||
|
||||
Reference in New Issue
Block a user