Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const registerShape = (geoName: string, shapeName: string, shapeFun: any) => {
F2.Shape.registerShape(geoName, shapeName, shapeFun);
};
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;
}
var registerShape = function registerShape(geoName, shapeName, shapeFun) {
F2.Shape.registerShape(geoName, shapeName, shapeFun);
};
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', {
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;
}