Skip to content

Commit

Permalink
fix: 修复饼图文字重叠 (#57)
Browse files Browse the repository at this point in the history
* chore(deps): bump axios from 0.21.4 to 0.26.1 (#54)

Bumps [axios](https://github.com/axios/axios) from 0.21.4 to 0.26.1.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md)
- [Commits](axios/axios@v0.21.4...v0.26.1)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: 修复图表文字重叠, fixes #50

* fix: loss css token (#58)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: yuyang <[email protected]>
  • Loading branch information
3 people authored Apr 6, 2022
1 parent ac70599 commit edf50a4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 20 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},
"dependencies": {
"@reduxjs/toolkit": "^1.6.0",
"axios": "^0.21.4",
"axios": "^0.26.1",
"axios-jsonp": "^1.0.4",
"classnames": "^2.3.1",
"dayjs": "^1.10.7",
Expand All @@ -57,7 +57,7 @@
"react-redux": "^7.2.4",
"react-router-dom": "^5.2.0",
"tdesign-icons-react": "0.0.8",
"tdesign-react": "^0.27.0",
"tdesign-react": "^0.30.1",
"tvision-color": "^1.3.1"
},
"browserslist": {
Expand Down
2 changes: 2 additions & 0 deletions src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { HashRouter } from 'react-router-dom';
import store from 'modules/store';
import App from 'layouts/index';

import 'tdesign-react/es/style/index.css';

import './styles/index.less';

const renderApp = () => {
Expand Down
19 changes: 1 addition & 18 deletions src/pages/Dashboard/Base/chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export const getPieChartOptions = (radius = 42): EChartOption => ({
type: 'pie',
radius: ['48%', '60%'],
avoidLabelOverlap: false,
silent: true,
itemStyle: {
borderWidth: 1,
},
Expand All @@ -113,24 +114,6 @@ export const getPieChartOptions = (radius = 42): EChartOption => ({
},
},
},
emphasis: {
label: {
show: true,
formatter: ['{value|{d}%}', '{name|{b}渠道占比}'].join('\n'),
rich: {
value: {
fontSize: 28,
fontWeight: 'normal',
lineHeight: 46,
},
name: {
color: '#909399',
fontSize: 12,
lineHeight: 14,
},
},
},
},
labelLine: {
show: false,
},
Expand Down

0 comments on commit edf50a4

Please sign in to comment.