64 lines
973 B
Vue
64 lines
973 B
Vue
<script lang='ts' setup>
|
|
const tradingViewInst = useTemplateRef<HTMLDivElement>("tradingViewInst");
|
|
|
|
useTradingView(tradingViewInst, {
|
|
type: "Area",
|
|
data: [
|
|
{
|
|
time: "2023-01-01",
|
|
value: 1000,
|
|
},
|
|
{
|
|
time: "2023-02-01",
|
|
value: 1200,
|
|
},
|
|
{
|
|
time: "2023-03-01",
|
|
value: 900,
|
|
},
|
|
{
|
|
time: "2023-04-01",
|
|
value: 1400,
|
|
},
|
|
{
|
|
time: "2023-05-01",
|
|
value: 1300,
|
|
},
|
|
{
|
|
time: "2023-06-01",
|
|
value: 1500,
|
|
},
|
|
{
|
|
time: "2023-07-01",
|
|
value: 1700,
|
|
},
|
|
{
|
|
time: "2023-08-01",
|
|
value: 1600,
|
|
},
|
|
],
|
|
weightChartOptions: {
|
|
height: 150,
|
|
rightPriceScale: {
|
|
visible: false,
|
|
},
|
|
leftPriceScale: {
|
|
visible: false,
|
|
},
|
|
},
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<div>
|
|
<h4>收益趋势</h4>
|
|
<div ref="tradingViewInst" />
|
|
</div>
|
|
</template>
|
|
|
|
<style lang='css' scoped>
|
|
h4 {
|
|
font-size: var(--title-font-size);
|
|
}
|
|
</style>
|