<script setup lang="ts">
const tradingViewContainer = useTemplateRef<HTMLElement>("tradingViewContainer");

useTradingView(tradingViewContainer, {
  data: [
    // 随机k线图数据
    { time: "2023-10-01", open: 100, high: 110, low: 90, close: 105 },
    { time: "2023-10-02", open: 105, high: 115, low: 95, close: 100 },
    { time: "2023-10-03", open: 100, high: 120, low: 80, close: 110 },
    { time: "2023-10-04", open: 110, high: 130, low: 100, close: 120 },
    { time: "2023-10-05", open: 120, high: 140, low: 110, close: 130 },
    { time: "2023-10-06", open: 130, high: 150, low: 120, close: 140 },
    { time: "2023-10-07", open: 140, high: 160, low: 130, close: 150 },
  ],
});
</script>

<template>
  <IonPage>
    <IonHeader>
      <IonToolbar class="ui-toolbar">
        <IonTitle>Home</IonTitle>
      </IonToolbar>
    </IonHeader>
    <IonContent :fullscreen="true">
      <div ref="tradingViewContainer" />
    </IonContent>
  </IonPage>
</template>
