Changed data label position of the production line count chart
This commit is contained in:
@@ -14,7 +14,7 @@ class CumulativeChart extends ChartWidget
|
||||
|
||||
protected $listeners = ['cumulativeChart'];
|
||||
|
||||
protected static ?string $maxHeight = '350px';
|
||||
protected static ?string $maxHeight = '400px';
|
||||
|
||||
|
||||
protected int|string|array $columnSpan = 12;
|
||||
@@ -224,20 +224,20 @@ class CumulativeChart extends ChartWidget
|
||||
// 'plugins' => [
|
||||
// 'datalabels' => false,
|
||||
// ],
|
||||
'plugins' => [
|
||||
'datalabels' => [
|
||||
'anchor' => 'start',
|
||||
'align' => 'start',
|
||||
'offset' => 4,
|
||||
'color' => '#000',
|
||||
'font' => [
|
||||
'weight' => 'bold',
|
||||
],
|
||||
'formatter' => RawJs::make('function(value) {
|
||||
return value;
|
||||
}'),
|
||||
'plugins' => [
|
||||
'datalabels' => [
|
||||
'anchor' => 'start', // Positions the label relative to the top of the bar
|
||||
'align' => 'start', // Aligns the label above the bar
|
||||
'offset' => -15, // Adjust if needed (positive moves up, negative moves down)
|
||||
'color' => '#000',
|
||||
'font' => [
|
||||
'weight' => 'bold',
|
||||
],
|
||||
'formatter' => RawJs::make('function(value) {
|
||||
return value;
|
||||
}'),
|
||||
],
|
||||
],
|
||||
'scales' => [
|
||||
'y' => [
|
||||
'beginAtZero' => true, //Start Y-axis from 0
|
||||
|
||||
Reference in New Issue
Block a user