Skip to content

Commit

Permalink
register line component for tree shaking
Browse files Browse the repository at this point in the history
  • Loading branch information
naltatis committed Oct 21, 2024
1 parent eabb030 commit af15bfe
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions assets/js/components/Sessions/CostHistoryChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,32 @@

<script>
import { Bar } from "vue-chartjs";
import { BarController, BarElement, CategoryScale, LinearScale, Legend, Tooltip } from "chart.js";
import {
BarController,
BarElement,
CategoryScale,
Legend,
LinearScale,
LineController,
LineElement,
Tooltip,
} from "chart.js";
import { registerChartComponents, commonOptions, tooltipLabelColor } from "./chartConfig";
import LegendList from "./LegendList.vue";
import formatter from "../../mixins/formatter";
import colors from "../../colors";
import { TYPES, GROUPS, PERIODS } from "./types";
registerChartComponents([BarController, BarElement, CategoryScale, LinearScale, Legend, Tooltip]);
registerChartComponents([
BarController,
BarElement,
CategoryScale,
Legend,
LinearScale,
LineController,
LineElement,
Tooltip,
]);
export default {
name: "CostHistoryChart",
Expand Down

0 comments on commit af15bfe

Please sign in to comment.