How to use the @antv/f2.Shape function in @antv/f2

To help you get started, we’ve selected a few @antv/f2 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 viserjs / viser / packages / viser-cell / src / utils / CustomizeUtils.ts View on Github external
export const registerShape = (geoName: string, shapeName: string, shapeFun: any) => {
  F2.Shape.registerShape(geoName, shapeName, shapeFun);
};
github alibaba / BizGoblin / packages / goblin / src / index.ts View on Github external
ISeriesConfig,
  IGuide,
  IGuideConfig,
  ILineGuide,
  IRectGuide,
  IHtmlGuide,
  ICoord,
  IPolarCoord,
  IRectCoord,
  ILegend,
  ILegendConfig,
  ITooltip,
  ITooltipConfig
};
export const Global = F2.Global;
export const Shape = F2.Shape;
export const Chart = F2.Chart;

export default function (config: any) {
  if (Util.isNil(config) || Util.isEmpty(config)) {
    return;
  }
  const commonChart = new CommonChart(config);
  commonChart.render();

  return commonChart;
}
github alibaba / BizGoblin / packages / goblin / lib / utils / CustomizeUtils.js View on Github external
var registerShape = function registerShape(geoName, shapeName, shapeFun) {
  F2.Shape.registerShape(geoName, shapeName, shapeFun);
};
github antvis / F2 / examples / point / scatter / demo / ordered-bubble.js View on Github external
import F2 from '@antv/f2';

const Shape = F2.Shape;
Shape.registerShape('point', 'with-text', {
  draw: function draw(cfg, container) {
    const size = cfg.size;
    const x = cfg.x;
    const y = cfg.y;
    const circle = container.addShape('Circle', {
      className: 'point',
      attrs: {
        x,
        y,
        r: size,
        fill: cfg.color
      }
    });
    const origin = cfg.origin._origin;
    const text = container.addShape('Text', {
github alibaba / BizGoblin / packages / goblin / lib / index.js View on Github external
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = _default;
exports.Chart = exports.Shape = exports.Global = void 0;

var _CommonChart = _interopRequireDefault(require("./core/CommonChart"));

var _Commom = require("./utils/Commom");

var F2 = require('@antv/f2');

var Global = F2.Global;
exports.Global = Global;
var Shape = F2.Shape;
exports.Shape = Shape;
var Chart = F2.Chart;
exports.Chart = Chart;

function _default(config) {
  if (_Commom.Util.isNil(config) || _Commom.Util.isEmpty(config)) {
    return;
  }

  var commonChart = new _CommonChart.default(config);
  commonChart.render();
  return commonChart;
}

@antv/f2

Charts for mobile visualization.

MIT
Latest version published 2 months ago

Package Health Score

81 / 100
Full package analysis