Skip to content

Commit

Permalink
fix: time series chart remains empty if no valid configuration can be…
Browse files Browse the repository at this point in the history
… created on first show
  • Loading branch information
claustres committed Sep 4, 2024
1 parent 3dd1778 commit 952b2dc
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions core/client/components/chart/KTimeSeriesChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,8 @@ watch(() => props.options, requestUpdate)
// Functions
async function onCanvasRef (ref) {
if (ref) {
if (!chart) {
const config = await makeChartConfig()
if (!config) return
chart = new Chart(ref.getContext('2d'), config)
}
} else {
if (chart) {
chart.destroy()
chart = null
}
}
canvas = ref
update()
}
function getUnit (timeSerie) {
return _.get(timeSerie, 'variable.unit')
Expand Down

0 comments on commit 952b2dc

Please sign in to comment.