How to use the @antv/f2.Global 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 / index.ts View on Github external
IRectGuide,
  IArcGuide,
  ILegend,
  ILegendConfig,
  ISeries,
  ISeriesConfig,
  ITooltip,
  ITooltipConfig,
  IScale,
  IMain,
};

export const registerAnimation = CustomizeUtils.registerAnimation;
export const registerShape = CustomizeUtils.registerShape;
export const registerGesture = CustomizeUtils.registerGesture;
export const Global = F2.Global;

function hasDataCondition(config: any) {
  let hasData = false;

  if (!_.isEmpty(config.data)) {
    hasData = true;
  }

  if (!_.isNil(config.views)) {
    if (_.isPlainObject(config.views) && !_.isEmpty(config.views.data)) {
      hasData = true;
    }

    if (_.isArray(config.views)) {
      for (const item of config.views) {
        if (!_.isEmpty(item.data)) {
github alibaba / BizGoblin / packages / goblin / src / index.ts View on Github external
IAnimate,
  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 / index.js View on Github external
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

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 23 days ago

Package Health Score

81 / 100
Full package analysis