Skip to content

Commit

Permalink
feat: base Chart component
Browse files Browse the repository at this point in the history
it can be used for multitype charts and as a base for custom charts

BREAKING CHANGE: chart events were removed
  • Loading branch information
dangreen committed Dec 3, 2022
1 parent 19e6049 commit 4039d43
Show file tree
Hide file tree
Showing 10 changed files with 334 additions and 463 deletions.
2 changes: 1 addition & 1 deletion sandboxes/reactive/src/App.vue
Expand Up @@ -26,7 +26,7 @@ const data = ref<ChartData<'bar'>>({
onMounted(() => {
setInterval(() => {
data.value = { ...chartConfig.data }
data.value = chartConfig.randomData()
}, 3000)
})
</script>
4 changes: 2 additions & 2 deletions sandboxes/reactive/src/chartConfig.ts
Expand Up @@ -2,7 +2,7 @@ function getRandomInt() {
return Math.floor(Math.random() * (50 - 5 + 1)) + 5
}

export const data = {
export const randomData = () => ({
labels: [
'January' + getRandomInt(),
'February',
Expand Down Expand Up @@ -37,7 +37,7 @@ export const data = {
]
}
]
}
})

export const options = {
responsive: true,
Expand Down
285 changes: 0 additions & 285 deletions src/BaseCharts.ts

This file was deleted.

0 comments on commit 4039d43

Please sign in to comment.