How to use the @antv/g2.Global.theme function in @antv/g2

To help you get started, we’ve selected a few @antv/g2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github antvis / G2Plot / src / plots / liquid / geometry / shape / liquid.ts View on Github external
const getLineAttrs = (cfg) => {
  const defaultAttrs = Global.theme.shape.hollowInterval;
  const attrs = _.mix({}, defaultAttrs, cfg.style);
  ShapeUtil.addStrokeAttrs(attrs, cfg);
  return attrs;
};
github antvis / G2Plot / src / plots / liquid / geometry / shape / liquid.ts View on Github external
const getFillAttrs = (cfg) => {
  const defaultAttrs = Global.theme.shape.interval;
  const attrs = _.mix({}, defaultAttrs, cfg.style);
  ShapeUtil.addFillAttrs(attrs, cfg);
  if (cfg.color) {
    attrs.stroke = attrs.stroke || cfg.color;
  }
  return attrs;
};