Show "No data to display yet" until we have at least two points for node stats charts
This commit is contained in:
parent
77835bcb9d
commit
f1f6c48128
@ -75,7 +75,7 @@ export class NodeStatisticsChartComponent implements OnInit {
|
|||||||
|
|
||||||
prepareChartOptions(data) {
|
prepareChartOptions(data) {
|
||||||
let title: object;
|
let title: object;
|
||||||
if (data.channels.length === 0) {
|
if (data.channels.length < 2) {
|
||||||
title = {
|
title = {
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: 'grey',
|
color: 'grey',
|
||||||
@ -135,14 +135,14 @@ export class NodeStatisticsChartComponent implements OnInit {
|
|||||||
return tooltip;
|
return tooltip;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
xAxis: data.channels.length === 0 ? undefined : {
|
xAxis: data.channels.length < 2 ? undefined : {
|
||||||
type: 'time',
|
type: 'time',
|
||||||
splitNumber: this.isMobile() ? 5 : 10,
|
splitNumber: this.isMobile() ? 5 : 10,
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
hideOverlap: true,
|
hideOverlap: true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
legend: data.channels.length === 0 ? undefined : {
|
legend: data.channels.length < 2 ? undefined : {
|
||||||
padding: 10,
|
padding: 10,
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
@ -167,7 +167,7 @@ export class NodeStatisticsChartComponent implements OnInit {
|
|||||||
'Capacity': true,
|
'Capacity': true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
yAxis: data.channels.length === 0 ? undefined : [
|
yAxis: data.channels.length < 2 ? undefined : [
|
||||||
{
|
{
|
||||||
type: 'value',
|
type: 'value',
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
@ -198,7 +198,7 @@ export class NodeStatisticsChartComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
series: data.channels.length === 0 ? [] : [
|
series: data.channels.length < 2 ? [] : [
|
||||||
{
|
{
|
||||||
zlevel: 1,
|
zlevel: 1,
|
||||||
name: $localize`:@@807cf11e6ac1cde912496f764c176bdfdd6b7e19:Channels`,
|
name: $localize`:@@807cf11e6ac1cde912496f764c176bdfdd6b7e19:Channels`,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user