Tooltip shows positions symbol according to prefix
This commit is contained in:
parent
641e3c5ff7
commit
4a2fd2cc9f
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
namespace App\Traits;
|
namespace App\Traits;
|
||||||
|
|
||||||
|
use Akaunting\Money\Money;
|
||||||
|
|
||||||
use App\Utilities\Chartjs;
|
use App\Utilities\Chartjs;
|
||||||
|
|
||||||
use Balping\JsonRaw\Raw;
|
use Balping\JsonRaw\Raw;
|
||||||
@ -107,7 +109,11 @@ trait Charts
|
|||||||
'position' => 'nearest',
|
'position' => 'nearest',
|
||||||
'callbacks' => [
|
'callbacks' => [
|
||||||
'label' => new Raw("function(tooltipItem, data) {
|
'label' => new Raw("function(tooltipItem, data) {
|
||||||
return '" . config('money.' . setting('default.currency') . '.symbol') . "' + tooltipItem.yLabel;
|
". config('money.' . setting('default.currency') . '.symbol_first' ) . " === 1
|
||||||
|
?
|
||||||
|
'" . config('money.' . setting('default.currency') . '.symbol' ) . "' + tooltipItem.yLabel;
|
||||||
|
:
|
||||||
|
tooltipItem.yLabel + '" . config('money.' . setting('default.currency') . '.symbol') . "';
|
||||||
}"),
|
}"),
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
@ -158,3 +164,4 @@ trait Charts
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user