2023-10-29 22:02:07 +03:00
|
|
|
<script setup lang="ts">
|
2023-11-03 23:09:45 +03:00
|
|
|
import ScatterplotVisualization from '@/components/visualizations/ScatterplotVisualization.vue'
|
2023-10-29 22:02:07 +03:00
|
|
|
import { ref } from 'vue'
|
|
|
|
|
|
|
|
const data = ref<any>({
|
|
|
|
axis: {
|
|
|
|
x: { label: 'x-axis label', scale: 'linear' },
|
|
|
|
y: { label: 'y-axis label', scale: 'logarithmic' },
|
|
|
|
},
|
|
|
|
points: { labels: 'visible' },
|
|
|
|
data: [
|
|
|
|
{ x: 0.1, y: 0.7, label: 'foo', color: '#FF0000', shape: 'circle', size: 0.2 },
|
|
|
|
{ x: 0.4, y: 0.2, label: 'baz', color: '#0000FF', shape: 'square', size: 0.3 },
|
|
|
|
],
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<Story
|
|
|
|
title="Scatterplot"
|
|
|
|
group="visualizations"
|
|
|
|
:layout="{ type: 'grid', width: 400 }"
|
|
|
|
autoPropsDisabled
|
|
|
|
>
|
2023-11-03 23:09:45 +03:00
|
|
|
<div style="height: 322px">
|
|
|
|
<ScatterplotVisualization :data="data" />
|
|
|
|
</div>
|
2023-10-29 22:02:07 +03:00
|
|
|
|
|
|
|
<template #controls>
|
|
|
|
<HstJson v-model="data" title="data" />
|
|
|
|
</template>
|
|
|
|
</Story>
|
|
|
|
</template>
|