Skip to content

Commit

Permalink
refactor: prettier code
Browse files Browse the repository at this point in the history
  • Loading branch information
visiky committed Nov 16, 2022
1 parent 09651a8 commit 7496bfc
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions site/examples/theme/theme/demo/palette.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import { Chart, register } from '@antv/g2';

const chart = new Chart({
container: 'container',
autoFit: true,
});

const colors = [
register('palette.customPalette', () => [
'#1677FF',
'#39C8AE',
'#C7B1FB',
Expand All @@ -16,9 +11,12 @@ const colors = [
'#765CE7',
'#65799B',
'#C4CD2A',
];
]);

register('palette.customPalette', () => colors);
const chart = new Chart({
container: 'container',
autoFit: true,
});

chart.theme({
defaultCategory10: 'customPalette',
Expand Down

0 comments on commit 7496bfc

Please sign in to comment.