Add raw attribute logging to debug boolean values

This commit is contained in:
Graham McIntire 2026-01-05 13:47:16 -06:00
parent ae5b73c495
commit af39c7e9fd
No known key found for this signature in database

View file

@ -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'