@antv/t8
Version:
T8 is a text visualization solution for unstructured data within the AntV technology stack, and it is a declarative T8 markdown syntax that can be used to describe the content of data interpretation reports.
25 lines (21 loc) • 772 B
JavaScript
;
var selection = require('./selection.js');
/**
* Creates an SVG element with proper styling and appends it to a container
*
* @param container - The container element to append SVG to
* @param width - SVG width
* @param height - SVG height
* @returns Selection object for the created SVG
*/
var createSvg = function (container, width, height) {
var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
svg.style.margin = '0px 4px';
svg.style.transform = 'translate(0px, 0.125em)';
svg.setAttribute('height', String(height));
svg.setAttribute('width', String(width));
container.appendChild(svg);
return new selection.Selection(svg);
};
exports.createSvg = createSvg;
//# sourceMappingURL=createSvg.js.map