35 lines
654 B
Vue
35 lines
654 B
Vue
<template>
|
|
<div ref="element" class="chart"/>
|
|
</template>
|
|
|
|
<script setup>
|
|
// 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>
|