Add raw attribute logging to debug boolean values
This commit is contained in:
parent
ae5b73c495
commit
af39c7e9fd
1 changed files with 7 additions and 0 deletions
|
|
@ -51,6 +51,13 @@ const SensorChart = {
|
|||
const canvas = this.el.querySelector('canvas')
|
||||
const ctx = canvas.getContext('2d')
|
||||
const unit = this.el.dataset.unit || '%'
|
||||
|
||||
console.log('Raw attributes:', {
|
||||
autoScale: this.el.dataset.autoScale,
|
||||
showZeroLine: this.el.dataset.showZeroLine,
|
||||
unit: this.el.dataset.unit
|
||||
})
|
||||
|
||||
const autoScale = this.el.dataset.autoScale === 'true' || this.el.dataset.autoScale === true
|
||||
const showZeroLine = this.el.dataset.showZeroLine === 'true' || this.el.dataset.showZeroLine === true
|
||||
const chartType = unit === 'bps' ? 'bar' : 'line'
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue