diff --git a/.dumirc.ts b/.dumirc.ts
index 43af4e7..5040b7e 100644
--- a/.dumirc.ts
+++ b/.dumirc.ts
@@ -13,6 +13,7 @@ Powered by AntV`,
socialLinks: {
github: 'https://github.com/antvis/GPT-Vis',
},
+ prefersColor: { default: 'light', switch: false },
},
// ssr:
// process.env.NODE_ENV === 'production'
@@ -31,6 +32,6 @@ Powered by AntV`,
'@c-primary': '#691eff',
'@s-content-width': '100%',
'@s-content-padding': '48px',
- '@s-sidebar-width': '300px',
+ '@s-sidebar-width': '280px',
},
});
diff --git a/docs/guide/custom-ui.md b/docs/guide/custom-ui.md
new file mode 100644
index 0000000..61d95d3
--- /dev/null
+++ b/docs/guide/custom-ui.md
@@ -0,0 +1,48 @@
+---
+title: 定制模型输出 UI
+nav: { title: '指南', order: 0 }
+toc: content
+order: 1
+---
+
+## 定制模型输出 UI
+
+为模型输出的结构化数据,通过代码块的方式定制 UI。
+
+```tsx | pure
+import { GPTVisLite, withChartCode } from '@antv/gpt-vis';
+
+const markdownContent = `
+\`\`\`weather
+{
+ "locationName": "Hangzhou",
+ "temperature": 11.4,
+ "humidity": 82,
+ "wind": 6.8,
+ "cloudiness": 75,
+ "uv": "0.2 of 11"
+}
+\`\`\`
+
+In Hangzhou, the current weather is as follows:
+- The temperature is 11.4°C, humidity is 82%, and wind speed is 6.8 kph.
+- There's 75% cloud cover, and the UV index is very low at 0.2 out of 11.
+- This indicates cool, humid conditions with overcast skies and minimal UV exposure.
+`;
+
+const customRenderers = {
+ weather: (props) => 'WeatherCard',
+};
+const components = {
+ code: withChartCode({
+ // register custom block renderer
+ languageRenderers: customRenderers,
+ }),
+};
+
+export default () => {
+ return
diff --git a/docs/guide/customize-style.md b/docs/guide/customize-style.md
index c00d354..d0d637f 100644
--- a/docs/guide/customize-style.md
+++ b/docs/guide/customize-style.md
@@ -5,6 +5,8 @@ toc: content
order: 3
---
+# 定制图表样式
+
通过在 [ConfigProvider](/components/config-provider) 中传入样式属性,来配置图表组件的全局样式。
## 定制组件级样式
diff --git a/docs/guide/demos/WeatherCard/index.tsx b/docs/guide/demos/WeatherCard/index.tsx
index 4b9aaa1..872dbf2 100644
--- a/docs/guide/demos/WeatherCard/index.tsx
+++ b/docs/guide/demos/WeatherCard/index.tsx
@@ -28,15 +28,13 @@ const WeatherCard: CodeBlockComponent = (props) => {
Wind
{wind}kph
-
diff --git a/src/Area/index.md b/src/Area/index.md
index 1dc975e..9cfe2fc 100644
--- a/src/Area/index.md
+++ b/src/Area/index.md
@@ -4,6 +4,7 @@ group:
order: 1
title: 统计图
demo: { cols: 2 }
+toc: content
nav: { title: '组件', order: 1 }
---
diff --git a/src/Bar/index.md b/src/Bar/index.md
index 49a65e4..20c2cd0 100644
--- a/src/Bar/index.md
+++ b/src/Bar/index.md
@@ -3,6 +3,7 @@ order: 4
group:
order: 1
title: 统计图
+toc: content
demo: { cols: 2 }
---
diff --git a/src/ChartCodeRender/index.md b/src/ChartCodeRender/index.md
index 1929c59..545a8f8 100644
--- a/src/ChartCodeRender/index.md
+++ b/src/ChartCodeRender/index.md
@@ -1,5 +1,6 @@
---
order: 2
+toc: content
group:
order: 10
title: 其他
diff --git a/src/Column/index.md b/src/Column/index.md
index 5c6cfb8..bb3ffa2 100644
--- a/src/Column/index.md
+++ b/src/Column/index.md
@@ -1,5 +1,6 @@
---
order: 2
+toc: content
group:
order: 1
title: 统计图
diff --git a/src/ConfigProvider/index.md b/src/ConfigProvider/index.md
index 7a4e59c..e77b2c7 100644
--- a/src/ConfigProvider/index.md
+++ b/src/ConfigProvider/index.md
@@ -1,5 +1,6 @@
---
order: 3
+toc: content
group:
order: 10
title: 其他
diff --git a/src/DualAxes/index.md b/src/DualAxes/index.md
index 81a311f..f962643 100644
--- a/src/DualAxes/index.md
+++ b/src/DualAxes/index.md
@@ -4,6 +4,7 @@ group:
order: 1
title: 统计图
demo: { cols: 2 }
+toc: content
---
# DualAxes 双轴图
diff --git a/src/FishboneDiagram/index.md b/src/FishboneDiagram/index.md
index f49b8b4..0b768b0 100644
--- a/src/FishboneDiagram/index.md
+++ b/src/FishboneDiagram/index.md
@@ -3,6 +3,7 @@ order: 6
group:
order: 4
title: 关系图
+toc: content
---
# FishboneDiagram 鱼骨图
diff --git a/src/FlowDiagram/index.md b/src/FlowDiagram/index.md
index 816f8ea..d557c9d 100644
--- a/src/FlowDiagram/index.md
+++ b/src/FlowDiagram/index.md
@@ -3,6 +3,7 @@ order: 2
group:
order: 3
title: 关系图
+toc: content
---
# FlowDiagram 流程图
diff --git a/src/GPTVis/index.md b/src/GPTVis/index.md
index 291dc62..40e5c81 100644
--- a/src/GPTVis/index.md
+++ b/src/GPTVis/index.md
@@ -3,6 +3,7 @@ order: 1
group:
order: 10
title: 其他
+toc: content
---
# GPTVis 协议渲染器
diff --git a/src/HeatMap/index.md b/src/HeatMap/index.md
index 1984622..983dec5 100644
--- a/src/HeatMap/index.md
+++ b/src/HeatMap/index.md
@@ -3,6 +3,7 @@ order: 3
group:
order: 2
title: 地图
+toc: content
---
# HeatMap 热力地图
diff --git a/src/Histogram/index.md b/src/Histogram/index.md
index 838f19f..ef3d94a 100644
--- a/src/Histogram/index.md
+++ b/src/Histogram/index.md
@@ -4,6 +4,7 @@ group:
order: 1
title: 统计图
demo: { cols: 2 }
+toc: content
---
# Histogram 直方图
diff --git a/src/IndentedTree/index.md b/src/IndentedTree/index.md
index 84e6ef1..711b394 100644
--- a/src/IndentedTree/index.md
+++ b/src/IndentedTree/index.md
@@ -4,6 +4,7 @@ group:
order: 3
title: 关系图
demo: { cols: 2 }
+toc: content
---
# IndentedTree 缩进树
diff --git a/src/Line/index.md b/src/Line/index.md
index 99f9929..5b109e8 100644
--- a/src/Line/index.md
+++ b/src/Line/index.md
@@ -3,6 +3,7 @@ order: 1
group:
order: 1
title: 统计图
+toc: content
demo: { cols: 2 }
---
diff --git a/src/Map/index.md b/src/Map/index.md
index 2e99e71..1d92476 100644
--- a/src/Map/index.md
+++ b/src/Map/index.md
@@ -3,6 +3,7 @@ order: 1
group:
order: 2
title: 地图
+toc: content
debug: true
---
diff --git a/src/MindMap/index.md b/src/MindMap/index.md
index 6707ed0..4f5f307 100644
--- a/src/MindMap/index.md
+++ b/src/MindMap/index.md
@@ -3,6 +3,7 @@ order: 1
group:
order: 3
title: 关系图
+toc: content
---
# MindMap 思维导图
diff --git a/src/NetworkGraph/index.md b/src/NetworkGraph/index.md
index df22035..8c8bee4 100644
--- a/src/NetworkGraph/index.md
+++ b/src/NetworkGraph/index.md
@@ -3,6 +3,7 @@ order: 1
group:
order: 3
title: 关系图
+toc: content
---
# NetworkGraph 网络图
diff --git a/src/OrganizationChart/index.md b/src/OrganizationChart/index.md
index 4aef93e..b184f52 100644
--- a/src/OrganizationChart/index.md
+++ b/src/OrganizationChart/index.md
@@ -3,6 +3,7 @@ order: 4
group:
order: 3
title: 关系图
+toc: content
---
# OrganizationChart 组织架构图
diff --git a/src/PathMap/index.md b/src/PathMap/index.md
index 85f461b..b9c41ac 100644
--- a/src/PathMap/index.md
+++ b/src/PathMap/index.md
@@ -4,6 +4,7 @@ group:
order: 2
title: 地图
demo: { cols: 2 }
+toc: content
---
# PathMap 路径地图
diff --git a/src/Pie/index.md b/src/Pie/index.md
index 968fd79..03360b6 100644
--- a/src/Pie/index.md
+++ b/src/Pie/index.md
@@ -3,6 +3,7 @@ order: 3
group:
order: 1
title: 统计图
+toc: content
---
# Pie 饼图
diff --git a/src/PinMap/index.md b/src/PinMap/index.md
index ff6dbd7..06a93a8 100644
--- a/src/PinMap/index.md
+++ b/src/PinMap/index.md
@@ -4,6 +4,7 @@ group:
order: 2
title: 地图
demo: { cols: 2 }
+toc: content
---
# PinMap 点标注地图
diff --git a/src/Radar/index.md b/src/Radar/index.md
index 9b573be..7b463ec 100644
--- a/src/Radar/index.md
+++ b/src/Radar/index.md
@@ -4,6 +4,7 @@ group:
order: 1
title: 统计图
demo: { cols: 2 }
+toc: content
---
# Radar 雷达图
diff --git a/src/Scatter/index.md b/src/Scatter/index.md
index e7c57a2..fd3dd25 100644
--- a/src/Scatter/index.md
+++ b/src/Scatter/index.md
@@ -4,6 +4,7 @@ group:
order: 1
title: 统计图
demo: { cols: 2 }
+toc: content
---
# Scatter 散点图
diff --git a/src/Text/index.md b/src/Text/index.md
index 3c1d3cb..93e7b17 100644
--- a/src/Text/index.md
+++ b/src/Text/index.md
@@ -3,6 +3,7 @@ order: 1
group:
order: 3
title: 文本
+toc: content
---
# VisText 文本
diff --git a/src/Treemap/index.md b/src/Treemap/index.md
index 436e042..ab98460 100644
--- a/src/Treemap/index.md
+++ b/src/Treemap/index.md
@@ -4,6 +4,7 @@ group:
order: 1
title: 统计图
demo: { cols: 2 }
+toc: content
---
# Treemap 矩阵树图
diff --git a/src/WordCloud/index.md b/src/WordCloud/index.md
index a9ba2b3..969f9b1 100644
--- a/src/WordCloud/index.md
+++ b/src/WordCloud/index.md
@@ -3,6 +3,7 @@ order: 7
group:
order: 1
title: 统计图
+toc: content
---
# WordCloud 词云图