Logo

GitLab

Sign in

qiangmj / ebc-Mes

  • Back to Dashboard
  • Project
  • Activity
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • Snippets
  • ebc-Mes
  • src
  • g2.js
  • init
    198ee074
    qmj authored
    2025-08-14 10:32:07 +0800  
    Browse Code »
g2.js 431 Bytes
Edit Raw Blame History
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
// 全局 G2 设置
import G2 from 'g2';

G2.track(false);

const colors = [
  '#1890FF', '#2FC25B', '#FACC14', '#F04864', '#8543E0', '#13C2C2', '#fa8c16', '#a0d911',
];
const config = {
  ...G2.Theme,
  defaultColor: '#3f9efb',
  colors: {
    default: colors,
    intervalStack: colors,
  },
  tooltip: {
    background: {
      radius: 4,
      fill: '#000',
      fillOpacity: 0.75,
    },
  },
};

G2.Global.setTheme(config);