@antv/f2
Version:
Charts for mobile visualization.
36 lines • 1.09 kB
JavaScript
import { __assign, __extends } from "tslib";
import { jsx } from '@antv/f-engine';
import { withInterval } from '../interval';
var Pictorial = /** @class */function (_super) {
__extends(Pictorial, _super);
function Pictorial() {
return _super !== null && _super.apply(this, arguments) || this;
}
Pictorial.prototype.render = function () {
var _a = this,
props = _a.props,
context = _a.context;
var px2hd = context.px2hd;
var _Symbol = px2hd(props).symbol;
var records = this.mapping();
return jsx("group", null, records.map(function (record) {
var key = record.key,
children = record.children;
return jsx("group", {
key: key
}, children.map(function (item) {
var xMax = item.xMax,
xMin = item.xMin,
yMax = item.yMax,
yMin = item.yMin;
return jsx(_Symbol, __assign({}, item, {
width: xMax - xMin,
height: yMax - yMin,
px2hd: px2hd
}));
}));
}));
};
return Pictorial;
}(withInterval({}));
export default Pictorial;