Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ const defaultChartOptions = (config) => ({
time: config.xType === 'time' && {
displayFormats: {
day: 'MMM DD, YYYY',
week: 'MMM DD, YYYY',
month: 'MMM DD, YYYY',
year: 'MMM DD, YYYY',
},
},
ticks: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ import ACTIVITIES_REPORT, { TOTAL_ACTIVITIES_WIDGET } from '@/modules/report/tem
import {
mapGetters,
} from '@/shared/vuex/vuex.helpers';
import { getTimeGranularityFromPeriod } from '@/utils/reports';
import { getTimeGranularityFromPeriod, parseAxisLabel } from '@/utils/reports';
import {
TOTAL_ACTIVITIES_QUERY,
} from '@/modules/widget/widget-queries';
Expand All @@ -95,12 +95,15 @@ const props = defineProps({
});

const period = ref(SEVEN_DAYS_PERIOD_FILTER);
const granularity = computed(() => getTimeGranularityFromPeriod(period.value));

const widgetChartOptions = chartOptions('area', {
legendPlugin: false,
xTicksCallback: (
value,
) => parseAxisLabel(value, granularity.value),
});

const granularity = computed(() => getTimeGranularityFromPeriod(period.value));
const datasets = computed(() => [
{
name: TOTAL_ACTIVITIES_WIDGET.name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ import {
mapGetters,
mapActions,
} from '@/shared/vuex/vuex.helpers';
import { getTimeGranularityFromPeriod } from '@/utils/reports';
import { getTimeGranularityFromPeriod, parseAxisLabel } from '@/utils/reports';
import {
TOTAL_MEMBERS_QUERY,
TOTAL_MEMBERS_FILTER,
Expand All @@ -122,11 +122,14 @@ const drawerExpanded = ref();
const drawerDate = ref();
const drawerTitle = ref();

const granularity = computed(() => getTimeGranularityFromPeriod(period.value));
const widgetChartOptions = chartOptions('area', {
legendPlugin: false,
xTicksCallback: (
value,
) => parseAxisLabel(value, granularity.value),
});

const granularity = computed(() => getTimeGranularityFromPeriod(period.value));
const datasets = computed(() => [
{
name: 'Total members',
Expand Down