Skip to content

Commit

Permalink
Fixed bugs in datasets updates
Browse files Browse the repository at this point in the history
  • Loading branch information
victorgarciaesgi committed Mar 9, 2022
1 parent 3fbe2c3 commit 1ad98a9
Show file tree
Hide file tree
Showing 8 changed files with 173 additions and 239 deletions.
4 changes: 2 additions & 2 deletions debug/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"@types/lodash-es": "^4.17.5",
"chart.js": "^3.7.0",
"lodash-es": "^4.17.21",
"vue": "^3.2.25",
"vue-chart-3": "^3.1.0-rc.8"
"vue": "^3.2.31",
"vue-chart-3": "^3.1.3"
},
"devDependencies": {
"@vitejs/plugin-vue": "^2.0.0",
Expand Down
134 changes: 52 additions & 82 deletions debug/vite/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 3 additions & 8 deletions debug/vite/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</div>
</template>

<script setup lang="tsx">
<script setup lang="ts">
import { Chart, ChartOptions, registerables } from 'chart.js';
import type { ChartData } from 'chart.js';
// import { BarChart, useBarChart } from 'vue-chart-3';
Expand All @@ -23,13 +23,9 @@ const options = computed<ChartOptions<'doughnut'>>(() => ({
scales: {
myScale: {
type: 'logarithmic',
position: legendTop.value ? 'left' : 'right',
},
},
plugins: {
legend: {
position: legendTop.value ? 'top' : 'bottom',
},
title: {
display: true,
text: 'Chart.js Doughnut Chart',
Expand All @@ -55,9 +51,8 @@ const { doughnutChartProps, doughnutChartRef } = useDoughnutChart({
let index = 20;
function shuffleData() {
// dataValues.value = shuffle(dataValues.value);
data.value.pop();
console.log(doughnutChartRef.value?.chartInstance);
// data.value = shuffle(data.value);
data.value.push(4);
}
</script>

Expand Down
4 changes: 2 additions & 2 deletions debug/vue-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"dependencies": {
"chart.js": "^3.7.1",
"core-js": "^3.19.1",
"vue": "^3.2.25",
"vue-chart-3": "^3.1.1"
"vue": "^3.2.31",
"vue-chart-3": "^3.1.3"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.10.2",
Expand Down
Loading

0 comments on commit 1ad98a9

Please sign in to comment.