Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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)) {
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;
}
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;
}