show time labels only on first chart

This commit is contained in:
2024-09-25 09:23:04 +02:00
committed by l_samenv
parent 6edb926bf8
commit 91c1f7c3bb

View File

@ -1364,10 +1364,7 @@ function Graph(gindex, container, x_label, y_label, tag, scaleType = "linear"){
let ctx = canvas.getContext("2d");
let self = this;
chart = new Chart(ctx,
{
type: 'scatter',
options: {
let chart_options = {
responsive: true,
maintainAspectRatio: false,
animation:{duration:0},
@ -1491,8 +1488,13 @@ function Graph(gindex, container, x_label, y_label, tag, scaleType = "linear"){
}
if (gindex != 0) {
// show time labels only on first chart
chart_options.scales.x.ticks.callback = function () { return ''; }
}
)
chart = new Chart(ctx, {type: 'scatter', options: chart_options})
//console.log('create legend')
let legend = document.createElement('div');