<!-- eslint-disable unicorn/numeric-separators-style -->
<script setup lang="ts">
import { 星座样本IQ } from './_星座样本IQ.no-lint';

definePage({
  meta: {
    title: '星座图 iframe',
  },
});

type ConstellationDiagramArr = Array<[number, number]>;

const data = ref<ConstellationDiagramArr>([
  [0.20898877234451796, 0.8329353515647436],
  [-0.6589349632101078, 0.5886313023998213],
]);

setTimeout(() => {
  // 将星座样本IQ数据转换为二维数组
  const newData = 星座样本IQ.starI.map((i, index) => [
    i, //
    星座样本IQ.starQ[index],
  ]) as ConstellationDiagramArr;
  data.value = newData.slice(0, 20);

  console.debug(data.value.map((item) => item.join(',')).join('\n'));
}, 1000);
</script>

<template>
  <IframeConstellationDiagram :data style="width: 300px; height: 300px" />
</template>
