PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.11.10
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.11.10
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 All 149 releases
← All changes | js/render-chartjs.js +10 -7 3.10.03.11.10 View file →
@@ -132,9 +132,10 @@
132 132 label += ': ';
133 133 }
134 134 var format = context.dataset.format || '';
135 135 if ( format ) {
136 - label += format_datum( context.formattedValue, format );
136 + var lastSuffix = numeral(context.formattedValue).format(format).replace(/[0-9]/g, '');
137 + label += context.formattedValue + lastSuffix;
137 138 } else {
138 139 format = 'undefined' !== typeof context.chart.config._config.options.format ? context.chart.config._config.options.format : '';
139 140 if ( format ) {
140 141 label += format_datum( context.formattedValue, format );
@@ -197,12 +198,8 @@
197 198 if(typeof settings['animation'] !== 'undefined' && parseInt(settings['animation']['duration']) === 0){
198 199 settings['animation']['duration'] = 1000;
199 200 }
200 201
201 - if(typeof settings['title'] !== 'undefined' && settings['title']['text'] !== ''){
202 - settings['title']['display'] = true;
203 - }
204 -
205 202 if(typeof settings['tooltip'] !== 'undefined' && typeof settings['tooltip']['intersect'] !== 'undefined'){
206 203 // jshint ignore:line
207 204 settings['tooltip']['intersect'] = settings['tooltip']['intersect'] == true || parseInt(settings['tooltip']['intersect']) === 1; // jshint ignore:line
208 205 }
@@ -229,8 +226,14 @@
229 226 settings.plugins = {
230 227 legend: settings.legend,
231 228 };
232 229
230 + if(typeof settings['title'] !== 'undefined' && settings['title']['text'] !== ''){
231 + settings.plugins['title'] = {};
232 + settings.plugins['title']['display'] = true;
233 + settings.plugins['title']['text'] = settings['title']['text'];
234 + }
235 +
233 236 handleAxes(settings, chart);
234 237
235 238 override(settings, chart);
236 239 }
@@ -270,9 +273,9 @@
270 273 var $o = {};
271 274 if(Array.isArray(settings[axis][i]) || typeof settings[axis][i] === 'object'){
272 275 for(var j in settings[axis][i]){
273 276 var $val = '';
274 - if(j === 'labelString'){
277 + if(j === 'labelString'){
275 278 $o['display'] = true;
276 279 $val = settings[axis][i][j];
277 280 }else if(i === 'ticks'){
278 281 // number values under ticks need to be converted to numbers or the library throws a JS error.
@@ -466,9 +469,9 @@
466 469
467 470 switch(type) {
468 471 case 'number':
469 472 // numeral.js works on 0 instead of # so we just replace that in the ICU pattern set.
470 - format = format.replace(/#/g, '0');
473 + format = format.replace(/#/g, '0').replace(/%/g, '');
471 474 // we also replace all instance of '$' as that is more relevant for ticks.
472 475 if(removeDollar){
473 476 format = format.replace(/\$/g, '');
474 477 }