widget chart label integer format added

This commit is contained in:
Cihan Şentürk 2022-10-19 18:20:49 +03:00 committed by GitHub
parent 4b3774747a
commit 5397389f6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -106,6 +106,11 @@ trait Charts
$percent_position = $position ?: setting('localisation.percent_position');
switch ($type) {
case 'integer':
$label = new Raw("function(value) {
return value
}");
break;
case 'percent':
$label = new Raw("function(value) {
" . ($percent_position == 'right' ? "return value + '%';" : "return '%' + value;") . "