This commit is contained in:
2020-10-08 19:16:36 +00:00
parent c3b5a360f7
commit 724d652682
3 changed files with 11 additions and 6 deletions

View File

@@ -310,14 +310,21 @@ export default {
},
dbTopTablesChartData() {
// debugger;
if (!this.db.topTables) {
return { labels: [], datasets: [] };
}
return {
// These labels appear in the legend and in the tooltips when hovering different arcs
//_.map(users, 'user');
labels: window.$gz._.map(this.db.topTables, "name"),
//de-lodash
// labels: window.$gz._.map(this.db.topTables, "name"),
labels: this.db.topTables.map(z => z.name),
datasets: [
{
label: this.$ay.t("MetricTopTablesSize"),
data: window.$gz._.map(this.db.topTables, "value"),
//de-lodash
// data: window.$gz._.map(this.db.topTables, "value"),
data: this.db.topTables.map(z => z.value),
backgroundColor: getPalette(
this.db.topTables ? this.db.topTables.length : 3
),