fix: 补充 chart文档 以及调整目录结构
This commit is contained in:
@@ -30,7 +30,9 @@ export const sidebar = {
|
|||||||
text: 'chart',
|
text: 'chart',
|
||||||
link: '/chart',
|
link: '/chart',
|
||||||
items: [
|
items: [
|
||||||
{text: 'chartTimeSeries', link: '/chartTimeSeries'}
|
{text: 'chartTimeSeries', link: '/chartTimeSeries'},
|
||||||
|
{text: 'chartAutotopology', link: '/chartAutotopology'},
|
||||||
|
{text: 'chartDiagram', link: '/chartDiagram'},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<script lang="ts" setup>
|
||||||
|
const props = withDefaults(defineProps<{
|
||||||
|
/**
|
||||||
|
* chart相关信息 主要是要里面的 id 以及 params
|
||||||
|
*/
|
||||||
|
chartInfo?: { },
|
||||||
|
/**
|
||||||
|
* chart数据
|
||||||
|
*/
|
||||||
|
chartData?: [],
|
||||||
|
/**
|
||||||
|
* chart相应配置
|
||||||
|
*/
|
||||||
|
chartOption?: { },
|
||||||
|
/**
|
||||||
|
* 但是否显示全部数据
|
||||||
|
*/
|
||||||
|
showAllData?: Boolean,
|
||||||
|
/**
|
||||||
|
* dashboard 相关变量
|
||||||
|
*/
|
||||||
|
globalVariables?: [],
|
||||||
|
|
||||||
|
}>(), {
|
||||||
|
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<script lang="ts" setup>
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<div></div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
map:
|
||||||
|
path: /chartAutotopology
|
||||||
|
---
|
||||||
|
|
||||||
|
# 关联组件
|
||||||
|
1. meta2dMain topo图组件
|
||||||
|
|
||||||
|
```vue
|
||||||
|
<el-carousel>
|
||||||
|
<el-carousel-item v-for="(item,index) in allProject">
|
||||||
|
<meta2dMain/>
|
||||||
|
</el-carousel-item>
|
||||||
|
</el-carousel>
|
||||||
|
```
|
||||||
|
|
||||||
|
props 跟chartTimeSeries 一致
|
||||||
|
|
||||||
|
<API src="./chartAutotopology.vue" lang="en"></API>
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
map:
|
||||||
|
path: /chartAutotopology
|
||||||
|
---
|
||||||
|
|
||||||
|
# 关联组件
|
||||||
|
1. meta2dMain topo图组件
|
||||||
|
|
||||||
|
```vue
|
||||||
|
<el-carousel>
|
||||||
|
<el-carousel-item v-for="(item,index) in allProject">
|
||||||
|
<meta2dMain/>
|
||||||
|
</el-carousel-item>
|
||||||
|
</el-carousel>
|
||||||
|
```
|
||||||
|
|
||||||
|
props 跟chartTimeSeries 一致
|
||||||
|
|
||||||
|
<API src="./chartAutotopology.vue" lang="zh"></API>
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<script lang="ts" setup>
|
||||||
|
const props = withDefaults(defineProps<{
|
||||||
|
/**
|
||||||
|
* chart相关信息 主要是要里面的 id 以及 params
|
||||||
|
*/
|
||||||
|
chartInfo?: { },
|
||||||
|
/**
|
||||||
|
* chart数据
|
||||||
|
*/
|
||||||
|
chartData?: [],
|
||||||
|
/**
|
||||||
|
* chart相应配置
|
||||||
|
*/
|
||||||
|
chartOption?: { },
|
||||||
|
/**
|
||||||
|
* 但是否显示全部数据
|
||||||
|
*/
|
||||||
|
showAllData?: Boolean,
|
||||||
|
/**
|
||||||
|
* dashboard 相关变量
|
||||||
|
*/
|
||||||
|
globalVariables?: [],
|
||||||
|
|
||||||
|
}>(), {
|
||||||
|
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
9
nezha-docs/src/chart/chartChild/chartDiagram/demo.vue
Normal file
9
nezha-docs/src/chart/chartChild/chartDiagram/demo.vue
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<script lang="ts" setup>
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<div></div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
17
nezha-docs/src/chart/chartChild/chartDiagram/index.en-US.md
Normal file
17
nezha-docs/src/chart/chartChild/chartDiagram/index.en-US.md
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
map:
|
||||||
|
path: /chartDiagram
|
||||||
|
---
|
||||||
|
|
||||||
|
# 关联组件
|
||||||
|
1. meta2dMain topo图组件
|
||||||
|
|
||||||
|
```vue
|
||||||
|
<div>
|
||||||
|
<meta2dMain />
|
||||||
|
</div>
|
||||||
|
```
|
||||||
|
|
||||||
|
props 跟chartTimeSeries 一致
|
||||||
|
|
||||||
|
<API src="./chartDiagram.vue" lang="en"></API>
|
||||||
17
nezha-docs/src/chart/chartChild/chartDiagram/index.zh-CN.md
Normal file
17
nezha-docs/src/chart/chartChild/chartDiagram/index.zh-CN.md
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
map:
|
||||||
|
path: /chartDiagram
|
||||||
|
---
|
||||||
|
|
||||||
|
# 关联组件
|
||||||
|
1. meta2dMain topo图组件
|
||||||
|
|
||||||
|
```vue
|
||||||
|
<div>
|
||||||
|
<meta2dMain />
|
||||||
|
</div>
|
||||||
|
```
|
||||||
|
|
||||||
|
props 跟chartTimeSeries 一致
|
||||||
|
|
||||||
|
<API src="./chartDiagram.vue" lang="en"></API>
|
||||||
32
nezha-docs/src/chart/chartChild/chartLegend/chartLegend.vue
Normal file
32
nezha-docs/src/chart/chartChild/chartLegend/chartLegend.vue
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<script lang="ts" setup>
|
||||||
|
const props = withDefaults(defineProps<{
|
||||||
|
/**
|
||||||
|
* chart相关信息 主要是要里面的 id 以及 params
|
||||||
|
*/
|
||||||
|
chartInfo?: { },
|
||||||
|
/**
|
||||||
|
* chart数据
|
||||||
|
*/
|
||||||
|
chartData?: [],
|
||||||
|
/**
|
||||||
|
* legend 数据
|
||||||
|
*/
|
||||||
|
legends: [],
|
||||||
|
/**
|
||||||
|
* 是否全屏
|
||||||
|
*/
|
||||||
|
isFullscreen: boolean,
|
||||||
|
/**
|
||||||
|
* 所有根据图表处理过后的数据
|
||||||
|
*/
|
||||||
|
series: []
|
||||||
|
|
||||||
|
}>(), {
|
||||||
|
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
9
nezha-docs/src/chart/chartChild/chartLegend/demo.vue
Normal file
9
nezha-docs/src/chart/chartChild/chartLegend/demo.vue
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<script lang="ts" setup>
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<div></div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
map:
|
||||||
|
path: /chartLegend
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
<API src="./chartLegend.vue" lang="en"></API>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
map:
|
||||||
|
path: /chartLegend
|
||||||
|
---
|
||||||
|
|
||||||
|
<API src="./chartLegend.vue" lang="zh"></API>
|
||||||
@@ -4,7 +4,22 @@ const props = withDefaults(defineProps<{
|
|||||||
* chart相关信息 主要是要里面的 id 以及 params
|
* chart相关信息 主要是要里面的 id 以及 params
|
||||||
*/
|
*/
|
||||||
chartInfo?: { },
|
chartInfo?: { },
|
||||||
|
/**
|
||||||
|
* chart数据
|
||||||
|
*/
|
||||||
|
chartData?: [],
|
||||||
|
/**
|
||||||
|
* chart相应配置
|
||||||
|
*/
|
||||||
|
chartOption?: { },
|
||||||
|
/**
|
||||||
|
* 但是否显示全部数据
|
||||||
|
*/
|
||||||
|
showAllData?: Boolean,
|
||||||
|
/**
|
||||||
|
* dashboard 相关变量
|
||||||
|
*/
|
||||||
|
globalVariables?: [],
|
||||||
|
|
||||||
}>(), {
|
}>(), {
|
||||||
|
|
||||||
|
|||||||
@@ -7,4 +7,13 @@ map:
|
|||||||
# 关联组件
|
# 关联组件
|
||||||
1. chart-legend legend 相关组件
|
1. chart-legend legend 相关组件
|
||||||
|
|
||||||
|
```vue
|
||||||
|
<div
|
||||||
|
ref="timeSeries-chart-box"
|
||||||
|
>
|
||||||
|
<div class="chartId"></div>
|
||||||
|
<chart-legend></chart-legend>
|
||||||
|
</div>
|
||||||
|
```
|
||||||
|
|
||||||
<API src="./chartTimeSeries.vue" lang="en"></API>
|
<API src="./chartTimeSeries.vue" lang="en"></API>
|
||||||
|
|||||||
@@ -7,4 +7,13 @@ map:
|
|||||||
# 关联组件
|
# 关联组件
|
||||||
1. chart-legend legend 相关组件
|
1. chart-legend legend 相关组件
|
||||||
|
|
||||||
|
```vue
|
||||||
|
<div
|
||||||
|
ref="timeSeries-chart-box"
|
||||||
|
>
|
||||||
|
<div class="chartId"></div>
|
||||||
|
<chart-legend></chart-legend>
|
||||||
|
</div>
|
||||||
|
```
|
||||||
|
|
||||||
<API src="./chartTimeSeries.vue" lang="zh"></API>
|
<API src="./chartTimeSeries.vue" lang="zh"></API>
|
||||||
|
|||||||
@@ -30,5 +30,11 @@ map:
|
|||||||
25. chartSankey 桑葚图
|
25. chartSankey 桑葚图
|
||||||
26. chartFunnel 漏斗图
|
26. chartFunnel 漏斗图
|
||||||
|
|
||||||
|
# 备注
|
||||||
|
大部分的组件props 跟chartTimeSeries 一致
|
||||||
|
|
||||||
|
下面只列举 chartTimeSeries 以及部分需要特殊注意的组件
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<API src="./chart.vue" lang="en"></API>
|
<API src="./chart.vue" lang="en"></API>
|
||||||
|
|||||||
@@ -30,5 +30,10 @@ map:
|
|||||||
25. chartSankey 桑葚图
|
25. chartSankey 桑葚图
|
||||||
26. chartFunnel 漏斗图
|
26. chartFunnel 漏斗图
|
||||||
|
|
||||||
|
# 备注
|
||||||
|
大部分的组件props 跟chartTimeSeries 一致
|
||||||
|
|
||||||
|
下面只列举 chartTimeSeries 以及部分需要特殊注意的组件
|
||||||
|
|
||||||
|
|
||||||
<API src="./chart.vue" lang="zh"></API>
|
<API src="./chart.vue" lang="zh"></API>
|
||||||
|
|||||||
Reference in New Issue
Block a user