[FIX] 修正機台稼動率圖表 tooltip 顯示 undefined 與 accessibility 提示框問題
1. 修正 utilization.blade.php 自訂 Tooltip 中獲取小時標籤的寫法,改為直接使用 scope 中的 labels 變數,解決動態數據加載時顯示 undefined 的問題。 2. 於 ApexCharts 的 chart 配置中設定 accessibility.enabled = false,防止瀏覽器或輔助擴充套件顯示 ARIA 輔助提示框。
This commit is contained in:
parent
86e895a4ae
commit
7bf8dc173d
@ -91,7 +91,10 @@
|
||||
type: 'bar',
|
||||
height: 350,
|
||||
toolbar: { show: false },
|
||||
fontFamily: 'Plus Jakarta Sans, sans-serif'
|
||||
fontFamily: 'Plus Jakarta Sans, sans-serif',
|
||||
accessibility: {
|
||||
enabled: false
|
||||
}
|
||||
},
|
||||
plotOptions: {
|
||||
bar: { borderRadius: 6, columnWidth: '60%' }
|
||||
@ -123,7 +126,7 @@
|
||||
tooltip: {
|
||||
theme: 'dark',
|
||||
custom: function ({ series, seriesIndex, dataPointIndex, w }) {
|
||||
const hour = w.globals.categoryLabels[dataPointIndex];
|
||||
const hour = labels[dataPointIndex] || '';
|
||||
const count = series[seriesIndex][dataPointIndex];
|
||||
return '<div class="px-3 py-2 bg-slate-900 text-white rounded-lg border border-slate-700 shadow-xl">' +
|
||||
'<span class="text-[10px] font-black uppercase tracking-widest block opacity-50 mb-1">' + hour + '</span>' +
|
||||
|
||||
Loading…
Reference in New Issue
Block a user