mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
2.1 KiB
2.1 KiB
title, createTime, icon, permalink
| title | createTime | icon | permalink |
|---|---|---|---|
| chart.js | 2025/10/08 19:33:49 | solar:chart-bold | /en/guide/chart/chartjs/ |
Overview
The theme supports embedding chart.js charts within articles.
This feature is powered by @vuepress/plugin-markdown-chart.
Configuration
This feature is disabled by default in the theme.
You need to install the chart.js library in your project.
::: npm-to
npm install chart.js
:::
Then, enable the feature in the .vuepress/config.ts configuration file:
export default defineUserConfig({
theme: plumeTheme({
markdown: {
chartjs: true, // [!code ++]
},
})
})
Syntax
::: chartjs Title
```json
{
// Chart configuration goes here
}
```
:::
Refer to the chart.js documentation for chart configuration details.
Examples
::: note Examples are forked from @vuepress/plugin-markdown-chart, licensed under MIT. :::
Bar Chart
Input:
Output:
Bubble Chart
Input:
Output:
Line Chart
Input:
Output:
Polar Area Chart
Input:
Output:
Radar Chart
Input:
Output:
Scatter Chart
Input:
Output: