show time labels only on first chart
This commit is contained in:
@ -1364,10 +1364,7 @@ function Graph(gindex, container, x_label, y_label, tag, scaleType = "linear"){
|
|||||||
let ctx = canvas.getContext("2d");
|
let ctx = canvas.getContext("2d");
|
||||||
let self = this;
|
let self = this;
|
||||||
|
|
||||||
chart = new Chart(ctx,
|
let chart_options = {
|
||||||
{
|
|
||||||
type: 'scatter',
|
|
||||||
options: {
|
|
||||||
responsive: true,
|
responsive: true,
|
||||||
maintainAspectRatio: false,
|
maintainAspectRatio: false,
|
||||||
animation:{duration:0},
|
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')
|
//console.log('create legend')
|
||||||
let legend = document.createElement('div');
|
let legend = document.createElement('div');
|
||||||
|
Reference in New Issue
Block a user