@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.
23 lines (20 loc) • 739 B
JavaScript
import { Selection } from './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(svg);
};
export { createSvg };
//# sourceMappingURL=createSvg.js.map