Skip to content

Commit

Permalink
hide some series by default on metrics page
Browse files Browse the repository at this point in the history
  • Loading branch information
jabelone committed Jul 13, 2024
1 parent 12b4141 commit bc9e840
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src-frontend/src/components/MetricsGraph.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,27 @@ export default {
type: Array,
default: () => [],
},
id: {
type: String,
default: '',
},
},
data() {
return {};
},
mounted() {
setTimeout(() => {
const chart = ApexCharts.getChartByID('metrics-graph-' + this.id);
chart.hideSeries('Inactive Member');
chart.hideSeries('Account Only');
chart.hideSeries('New Member');
}, 0); // triggers on the next dom update
},
computed: {
options() {
return {
chart: {
id: 'metrics-graph',
id: 'metrics-graph-' + this.id,
},
xaxis: {
categories: this.metricsData.map((item) =>
Expand Down Expand Up @@ -66,7 +78,7 @@ export default {
});
return Object.keys(states).map((state) => {
return {
name: state,
name: this.$t('stats.labels.' + state),
data: states[state],
};
});
Expand Down

0 comments on commit bc9e840

Please sign in to comment.