<script lang='ts' setup>
const tradingViewInst = useTemplateRef<HTMLDivElement>("tradingViewInst");

useTradingView(tradingViewInst, {
  type: "Area",
  data: [
    {
      time: "2025-12-01",
      value: 1100.50,
    },
    {
      time: "2025-12-05",
      value: 1300.80,
    },
    {
      time: "2025-12-10",
      value: 1450.20,
    },
    {
      time: "2025-12-15",
      value: 1200.60,
    },
    {
      time: "2025-12-20",
      value: 1350.90,
    },
    {
      time: "2025-12-25",
      value: 1380.40,
    },
    {
      time: "2025-12-27",
      value: 1256.80,
    },
  ],
  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>
