Skip to content

Commit

Permalink
♻️ refactor: Update dumi
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Nov 22, 2024
1 parent ea2f11d commit 3a7fa29
Show file tree
Hide file tree
Showing 14 changed files with 67 additions and 50 deletions.
4 changes: 3 additions & 1 deletion .dumirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ const themeConfig = {
},
name: 'Charts',
nav: [
{ link: '/components/area-chart', title: 'Components' },
{ link: '/components/bar-chart', title: 'Charts' },
{ link: 'https://ui.lobehub.com', mode: 'override', title: 'UI' },
{ link: 'https://icon.lobehub.com', mode: 'override', title: 'Icons' },
{ link: '/changelog', title: 'Changelog' },
],
socialLinks: {
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,18 @@ React modern charts components built on recharts

## ✨ Features

- [x] Line Chart
- [x] Area Chart
- [x] Bar Chart
- [x] Donut Chart
- [x] Funnel Chart
- [x] Scatter Chart
- [x] Spark Chart
- [x] Heatmaps
- [x] Data List
- [x] Tracker
- [x] Legend

<div align="right">

[![][back-to-top]](#readme-top)
Expand Down
58 changes: 28 additions & 30 deletions docs/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Grid } from '@lobehub/ui';
import { Grid, Snippet } from '@lobehub/ui';
import { Card } from 'antd';
import { createStyles } from 'antd-style';
import { Center, Flexbox } from 'react-layout-kit';

import AreaChart from '@/AreaChart/demos/example';
import BarChart from '@/BarChart/demos/example';
Expand All @@ -9,35 +9,33 @@ import DonutChart from '@/DonutChart/demos/withLegend';
import LineChart from '@/LineChart/demos/customColors';
import ScatterChart from '@/ScatterChart/demos/example';

const useStyles = createStyles(({ css }) => ({
container: css`
margin-top: -4%;
`,
}));

export default () => {
const { styles } = useStyles();

return (
<Grid className={styles.container} gap={16} style={{ maxWidth: 1280 }} width={'100%'}>
<Card>
<BarChart />
</Card>
<Card>
<AreaChart />
</Card>
<Card>
<LineChart />
</Card>
<Card>
<DonutChart />
</Card>
<Card>
<ScatterChart />
</Card>
<Card>
<BarChartGroups />
</Card>
</Grid>
<Flexbox gap={48}>
<Center>
<h2 style={{ fontSize: 20 }}>To install Lobe Charts, run the following command:</h2>
<Snippet language={'bash'}>{'$ bun add @lobehub/charts'}</Snippet>
</Center>
<Grid gap={16} rows={2} style={{ maxWidth: 960 }} width={'100%'}>
<Card>
<BarChart />
</Card>
<Card>
<AreaChart />
</Card>
<Card>
<LineChart />
</Card>
<Card>
<DonutChart />
</Card>
<Card>
<ScatterChart />
</Card>
<Card>
<BarChartGroups />
</Card>
</Grid>
</Flexbox>
);
};
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,43 +67,43 @@
]
},
"dependencies": {
"@babel/runtime": "^7.24.8",
"@babel/runtime": "^7.26.0",
"date-fns": "^3.6.0",
"polished": "^4.3.1",
"recharts": "^2.12.7"
"recharts": "^2.13.3"
},
"devDependencies": {
"@commitlint/cli": "^19.3.0",
"@icons-pack/react-simple-icons": "^9.6.0",
"@lobehub/lint": "^1.24.3",
"@lobehub/ui": "^1.146.8",
"@commitlint/cli": "^19.6.0",
"@icons-pack/react-simple-icons": "^9.7.0",
"@lobehub/lint": "^1.24.4",
"@lobehub/ui": "^1.153.0",
"@testing-library/react": "^14.3.1",
"@types/chroma-js": "^2.4.4",
"@types/pangu": "^4.0.2",
"@types/query-string": "^6.3.0",
"@types/react": "18.2.40",
"@types/react-dom": "^18.3.0",
"@types/react-dom": "^18.3.1",
"@vitest/coverage-v8": "~1.2.2",
"babel-plugin-antd-style": "^1.0.4",
"commitlint": "^19.3.0",
"commitlint": "^19.6.0",
"concurrently": "^8.2.2",
"cross-env": "^7.0.3",
"dayjs": "^1.11.13",
"dumi": "2.2.17",
"dumi-theme-lobehub": "^1.8.1",
"eslint": "^8.57.0",
"father": "4.3.1",
"dumi": "^2.4.14",
"dumi-theme-lobehub": "^1.8.3",
"eslint": "^8.57.1",
"father": "^4.5.1",
"husky": "9.0.11",
"jsdom": "^23.2.0",
"lint-staged": "^15.2.7",
"lint-staged": "^15.2.10",
"prettier": "^3.3.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"remark": "^14.0.3",
"remark-cli": "^11.0.0",
"semantic-release": "^21.1.2",
"stylelint": "^15.11.0",
"typescript": "^5.5.3",
"typescript": "^5.6.3",
"vitest": "~1.2.2"
},
"peerDependencies": {
Expand Down
1 change: 1 addition & 0 deletions src/AreaChart/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
nav: Components
group: Charts
description: An area chart displays quantitative data graphically. It is based on the line chart but the area between x-axis and line is emphasized with color.
order: 2
---

<code src="./demos/index.tsx" nopadding></code>
Expand Down
1 change: 1 addition & 0 deletions src/BarChart/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
nav: Components
group: Charts
description: Bar charts compare numerical values and use the length of each bar to represent the value of each variable.
order: 0
---

<code src="./demos/index.tsx" nopadding></code>
Expand Down
2 changes: 1 addition & 1 deletion src/DataBars/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
nav: Components
group: Charts
group: Visualizations
atomId: 'ProgressBar, MarkerBar, DeltaBar, CategoryBar'
description: Components to indicate progress, performance, or status. For example, an individual score compared to a benchmark, the length of a process, or the deviation of a value.
---
Expand Down
1 change: 1 addition & 0 deletions src/FunnelChart/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
nav: Components
group: Charts
description: A funnel chart illustrates the progression or conversion rates through successive stages of a process.
order: 3
---

<code src="./demos/index.tsx" nopadding></code>
Expand Down
2 changes: 1 addition & 1 deletion src/Heatmaps/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
nav: Components
group: Charts
group: Visualizations
description: A flexible React component to display activity data in a heatmaps chart.
---

Expand Down
2 changes: 1 addition & 1 deletion src/Legend/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
nav: Components
group: Charts
group: Visualizations
description: A color-coded legend which goes well with data bar components.
---

Expand Down
1 change: 1 addition & 0 deletions src/LineChart/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
nav: Components
group: Charts
description: A line chart is a graphical representation that connects one or more series of data points with a continuous line.
order: 1
---

<code src="./demos/index.tsx" nopadding></code>
Expand Down
1 change: 1 addition & 0 deletions src/ScatterChart/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
nav: Components
group: Charts
description: A scatter chart visualizes relationships between two or three variables.
order: 4
---

<code src="./demos/index.tsx" nopadding></code>
Expand Down
2 changes: 1 addition & 1 deletion src/SparkChart/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
nav: Components
group: Charts
group: Visualizations
atomId: 'SparkAreaChart, SparkBarChart, SparkLineChart'
description: A small graph capable of visualizing data in a simplified form.
---
Expand Down
2 changes: 1 addition & 1 deletion src/Tracker/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
nav: Components
group: Charts
group: Visualizations
description: Component for visualizing activity logs or other data related to monitoring.
---

Expand Down

0 comments on commit 3a7fa29

Please sign in to comment.