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 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');
|
||||
|
Reference in New Issue
Block a user