File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 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 ) {
467
468
switch ( type ) {
468
469
case 'number' :
469
470
// numeral.js works on 0 instead of # so we just replace that in the ICU pattern set.
470
- format = format . replace ( / # / g, '0' ) ;
471
+ format = format . replace ( / # / g, '0' ) . replace ( / % / g , '' ) ;
471
472
// we also replace all instance of '$' as that is more relevant for ticks.
472
473
if ( removeDollar ) {
473
474
format = format . replace ( / \$ / g, '' ) ;
You can’t perform that action at this time.
0 commit comments