1
0
mirror of https://github.com/flarum/core.git synced 2025-07-30 21:20:24 +02:00

Only show this period's value in tooltip

This commit is contained in:
Toby Zerner
2017-12-11 18:53:47 +10:30
parent b65ad8a5ce
commit 8860def12e
2 changed files with 8 additions and 5 deletions

View File

@@ -107,8 +107,8 @@ export default class StatisticsWidget extends DashboardWidget {
}
const datasets = [
{values: lastPeriod, title: 'Last period ➡'},
{values: thisPeriod, title: 'This period'}
{values: lastPeriod},
{values: thisPeriod}
];
if (!context.chart) {
@@ -121,9 +121,7 @@ export default class StatisticsWidget extends DashboardWidget {
y_axis_mode: 'span',
is_series: 1,
show_dots: 0,
colors: ['rgba(0,0,0,0.1)', app.forum.attribute('themePrimaryColor')],
format_tooltip_x: d => d,
format_tooltip_y: d => d
colors: ['rgba(0, 0, 0, 0.1)', app.forum.attribute('themePrimaryColor')]
});
} else {
context.chart.update_values(datasets, labels);