diff --git a/src/components/Charts/Pie/index.js b/src/components/Charts/Pie/index.js index ad2d4e2aa2fb05f082d043a4e2f5eec6fe043a08..ce5bd30867b24ea01810ae08c2a2d504e6072da9 100644 --- a/src/components/Charts/Pie/index.js +++ b/src/components/Charts/Pie/index.js @@ -64,7 +64,7 @@ class Pie extends Component { lineWidth = 0, } = this.props; - const defaultColors = colors || ['#8543E0', '#F04864', '#FACC14', '#1890FF', '#13C2C2', '#2FC25B']; + const defaultColors = colors; let selected = this.props.selected || true; let tooltip = this.props.tooltips || true; diff --git a/src/g2.js b/src/g2.js index faadc6c357e234825f2f2248baf552042c74b578..0ff40f51331972042ca7dcba72b47a132918413c 100644 --- a/src/g2.js +++ b/src/g2.js @@ -3,9 +3,17 @@ import G2 from 'g2'; G2.track(false); +const colors = [ + '#8543E0', '#F04864', '#FACC14', '#1890FF', '#13C2C2', '#2FC25B', '#fa8c16', '#a0d911', +]; + const config = { ...G2.Theme, defaultColor: '#1089ff', + colors: { + default: colors, + intervalStack: colors, + }, tooltip: { background: { radius: 4,