提交 d083af8c 编写于 作者: D DebugIsFalse

Merge branch 'main' of gitcode.com:git_bot/ai-fe

<template>
<div class="w-full">
<canvas id="chart"></canvas>
<div class="w-full relative" style="aspect-ratio: 2/1">
<canvas id="chart" :aria-label="title"></canvas>
</div>
</template>
<script setup>
import { Chart } from 'chart.js/auto';
const props = defineProps({
type: {
type: String,
default: 'line'
},
title: {
type: String,
default: ''
......@@ -21,7 +25,7 @@ const props = defineProps({
})
onMounted(() => {
new Chart(document.getElementById('chart'), {
type: 'line',
type: props.type,
data: {
labels: props.labels,
datasets: [
......
<template>
<div class="w-full p-6">
<IMdMdc :content="mdStr"/>
</div>
</template>
<script setup>
const mdStr = `
::ProseLineChart{title='langchain-ai/langchain [2023-06-05,2024-06-04] Star Data' :labels='["2023-06-05","2023-06-12"]' :data='[43071,44946]'}
::ProseChart{title='langchain-ai/langchain [2023-06-05,2024-06-04] Star Data' :labels='["2023-06-05","2023-06-12"]' :data='[43071,44946]'}
`
</script>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册