Skip to content

Commit

Permalink
refactor: move charts to their corresponding page component
Browse files Browse the repository at this point in the history
they're so specific that it doesn't make sense to keep them in a shared folder
  • Loading branch information
simonwep committed Apr 21, 2024
1 parent 4a0f770 commit 03acdea
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/app/pages/dashboard/all-time/AllTimeChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<script lang="ts" setup>
import { computed } from 'vue';
import { useI18n } from 'vue-i18n';
import { StackedLineChartConfig } from '@components/charts/stacked-line-chart/StackedLineChart.types';
import StackedLineChart from '@components/charts/stacked-line-chart/StackedLineChart.vue';
import { useDataStore } from '@store/state';
import { totals } from '@store/state/utils/budgets';
import { StackedLineChartConfig } from './stacked-line-chart/StackedLineChart.types';
import StackedLineChart from './stacked-line-chart/StackedLineChart.vue';
const { t, locale } = useI18n();
const { state } = useDataStore();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,11 @@
import { computed } from 'vue';
import { useI18n } from 'vue-i18n';
import ChartPlaceholder from '@app/pages/shared/ChartPlaceholder.vue';
import {
SankeyChartConfig,
SankeyChartLabel,
SankeyChartLink
} from '@components/charts/sankey-chart/SankeyChart.types';
import SankeyChart from '@components/charts/sankey-chart/SankeyChart.vue';
import { useDataStore } from '@store/state';
import { totals } from '@store/state/utils/budgets';
import { ClassNames, sum, uuid } from '@utils';
import { SankeyChartConfig, SankeyChartLabel, SankeyChartLink } from './sankey-chart/SankeyChart.types';
import SankeyChart from './sankey-chart/SankeyChart.vue';
const props = defineProps<{
class?: ClassNames;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import * as echarts from 'echarts/core';
import { SVGRenderer } from 'echarts/renderers';
import { computed } from 'vue';
import EChart from '@components/charts/echart/EChart.vue';
import { SankeyChartConfig } from '@components/charts/sankey-chart/SankeyChart.types';
import { ClassNames } from '@utils';
import { SankeyChartConfig } from './SankeyChart.types';
echarts.use([SankeyChart, SVGRenderer]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
import { computed } from 'vue';
import { useI18n } from 'vue-i18n';
import ChartPlaceholder from '@app/pages/shared/ChartPlaceholder.vue';
import { LineChartConfig } from '@components/charts/line-chart/LineChart.types';
import LineChart from '@components/charts/line-chart/LineChart.vue';
import { useMonthNames } from '@composables';
import { useDataStore } from '@store/state';
import { totals } from '@store/state/utils/budgets';
import { aggregate, ClassNames, subtract, sum } from '@utils';
import { LineChartConfig } from './line-chart/LineChart.types';
import LineChart from './line-chart/LineChart.vue';
const props = defineProps<{
class?: ClassNames;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import * as echarts from 'echarts/core';
import { SVGRenderer } from 'echarts/renderers';
import { computed } from 'vue';
import EChart from '@components/charts/echart/EChart.vue';
import { LineChartConfig } from '@components/charts/line-chart/LineChart.types';
import { ClassNames } from '@utils';
import { LineChartConfig } from './LineChart.types';
echarts.use([SVGRenderer, LegendComponent, GridComponent, TooltipComponent]);
Expand Down
2 changes: 1 addition & 1 deletion src/app/pages/shared/BudgetPane.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

<script lang="ts" setup>
import { computed } from 'vue';
import MiniChart from '@components/charts/mini-chart/MiniChart.vue';
import { useDataStore } from '@store/state';
import { totals } from '@store/state/utils/budgets';
import BudgetGroups from './BudgetGroups.vue';
import Pane from './Pane.vue';
import MiniChart from './mini-chart/MiniChart.vue';
const props = defineProps<{
title: string;
Expand Down

0 comments on commit 03acdea

Please sign in to comment.