Skip to content

Commit

Permalink
remove backend for dummy
Browse files Browse the repository at this point in the history
  • Loading branch information
elproffesore committed Jun 19, 2024
1 parent 280e6df commit b27913b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
14 changes: 14 additions & 0 deletions components/DifferenceOfTwoGroupsComparison.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<script setup>
import * as d3 from 'd3'
import { ref, onMounted } from 'vue'
</script>
<template>
<div class="grid grid-cols-12 p-8">
<slot></slot>
</div>
</template>
<style>
</style>
10 changes: 5 additions & 5 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import ScrollytellingComponent from '~/components/ScrollytellingComponent.vue';
//params
const range = 10
const scroll = ref(0)
const data = await useFetch('/api/data', { query: { padding: scroll, range } })
const reactiveData = reactive(data)
//const data = await useFetch('/api/data', { query: { padding: scroll, range } })
//const reactiveData = reactive(data)
const scaleX = d3.scaleLinear().domain([0, range]).range([0, width - padding])
const scaleY = d3.scaleLinear().domain([0, 7]).range([height - padding, 0])
const height = 300;
Expand All @@ -16,9 +16,9 @@ const padding = 50;
const updateMenuNumber = ref(0)
const updateMenuProgress = ref(0)
watch(reactiveData, () => {
updateVisualization()
})
// watch(reactiveData, () => {
// updateVisualization()
// })
function updateMenu(resp) {
updateMenuNumber.value = resp.index
updateMenuProgress.value = resp.progress
Expand Down

0 comments on commit b27913b

Please sign in to comment.