Add message if on mining charts if there is no data to display

This commit is contained in:
nymkappa 2022-03-09 12:15:10 +01:00
parent 8d7546d2b5
commit 47da8c023b
No known key found for this signature in database
GPG Key ID: E155910B16E8BD04
2 changed files with 28 additions and 0 deletions

View File

@ -125,7 +125,21 @@ export class HashrateChartComponent implements OnInit {
}
prepareChartOptions(data) {
let title = undefined;
if (data.hashrates.length === 0) {
title = {
textStyle: {
color: "grey",
fontSize: 15
},
text: "Indexing in progress...",
left: "center",
top: "center"
};
}
this.chartOptions = {
title: title,
color: [
new graphic.LinearGradient(0, 0, 0, 0.65, [
{ offset: 0, color: '#F4511E' },

View File

@ -124,7 +124,21 @@ export class HashrateChartPoolsComponent implements OnInit {
}
prepareChartOptions(data) {
let title = undefined;
if (data.series.length === 0) {
title = {
textStyle: {
color: "grey",
fontSize: 15
},
text: "Indexing in progress...",
left: "center",
top: this.widget ? 115 : this.isMobile() ? 'center' : 225,
};
}
this.chartOptions = {
title: title,
grid: {
right: this.right,
left: this.left,