How to use the @hpcc-js/common.SVGWidget.prototype function in @hpcc-js/common

To help you get started, we’ve selected a few @hpcc-js/common examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hpcc-systems / Visualization / packages / chart / src / Pie.ts View on Github external
exit(_domNode, _element) {
        SVGWidget.prototype.exit.apply(this, arguments);
    }
github hpcc-systems / Visualization / packages / other / src / Opportunity.ts View on Github external
exit(domNode, element) {
        SVGWidget.prototype.exit.apply(this, arguments);
    }
github hpcc-systems / Visualization / packages / chart / src / Axis.ts View on Github external
update(_domNode, _element) {
        SVGWidget.prototype.update.apply(this, arguments);

        this.svg.style("display", this.hidden() ? "none" : null);

        const overlap = this.calcOverflow(_element);

        this.range(this.isHorizontal() ? [overlap.left, this.width() - overlap.right] : [this.height() - overlap.top - overlap.bottom, 0]);

        const context = this;
        function doPosition(element) {
            element.attr("transform", function () {
                switch (context.orientation()) {
                    case "left":
                        return "translate(" + overlap.depth + ", " + overlap.top + ")";
                    case "top":
                        return "translate(0," + overlap.depth + ")";
                    case "right":
github hpcc-systems / Visualization / packages / chart / src / Axis.ts View on Github external
enter(_domNode, element) {
        SVGWidget.prototype.enter.apply(this, arguments);
        this.svg = element.append("g");
        this.svgAxis = this.svg.append("g")
            .attr("class", "axis")
            ;
        this.svgText = this.svgAxis.append("text");

        this.svgGuides = (this._guideElement || element).append("g")
            .attr("class", "guide")
            ;
    }
github hpcc-systems / Visualization / packages / form / src / Slider.ts View on Github external
Slider.prototype.value = function (_?: any): any {
    const retVal = value.apply(this, arguments);
    if (!arguments.length) {
        if (!this.allowRange()) {
            return SVGWidget.prototype.data.call(this)[0][0];
        }
        return SVGWidget.prototype.data.call(this)[0];
    } else {
        SVGWidget.prototype.data.call(this, [this.allowRange() ? _ : [_, _]]);
    }
    return retVal;
};
github hpcc-systems / Visualization / packages / form / src / Slider.ts View on Github external
Slider.prototype.name = function (_: any): any {
    const retVal = name.apply(this, arguments);
    if (arguments.length) {
        const val = _ instanceof Array ? _ : [_];
        SVGWidget.prototype.columns.call(this, val);
    }
    return retVal;
};
github hpcc-systems / Visualization / packages / chart / src / Axis.ts View on Github external
postUpdate(_domNode, _element) {
        SVGWidget.prototype.postUpdate.apply(this, arguments);
        if (this._guideElement) {
            this._guideElement
                .attr("transform", this._element.attr("transform"))
                ;
        }
    }