Files
web/src/components/chart/Chart.vue
2024-04-23 23:52:00 -04:00

35 lines
707 B
Vue

<template>
<div ref="element" class="chart"/>
</template>
<script setup>
import "/public/charting_library/charting_library.js"
// import "/public/datafeeds/udf/dist/bundle.js"
import {onMounted, ref} from "vue";
import {initWidget} from "@/charts/chart.js";
const element = ref()
onMounted(() => {
const el = element.value;
initWidget(el)
initShapes()
})
function initShapes() {
// const c = widget.chart()
// for( const s of ss.shapes ) {
// const type = s.type.toLowerCase().replace(' ','_')
// console.log('create type', type)
// c.createMultipointShape(s.points, {shape:type})
// }
}
</script>
<style scoped lang="scss">
.chart {
width: 100%;
height: 100%;
}
</style>