How to use the @hpcc-js/common.Text 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 / tests / test-common / src / common.spec.ts View on Github external
break;
                            case List:
                                renderSmall(new List()
                                    .data(menuList)
                                );
                                break;
                            case Menu:
                                renderMedium(new Menu()
                                    .data(menuList)
                                );
                                break;
                            case Surface:
                                renderMedium(new Surface()
                                    .title("Surface")
                                    .menu(menuList)
                                    .content(new Text()
                                        .text("Hello\nand\nWelcome!")
                                    ));
                                break;
                            case ResizeSurface:
                                renderMedium(new ResizeSurface()
                                    .title("Resize Me")
                                    .menu(menuList)
                                    .content(new Text()
                                        .text("I\nam\nResizale!")
                                    ));
                                break;
                            case EntityCard:
                                renderMedium(new EntityCard()
                                    .icon("")
                                    .iconDiameter(28)
                                    .iconPaddingPercent(0)
github hpcc-systems / Visualization / packages / layout / src / Layered.ts View on Github external
addLayer(widget, placement: LayerPlacement = "default", widthRatio: number = 1, heightRatio: number = 1) {
        const widgets = this.widgets();
        widgets.push(widget ? widget : new Text().text("No widget defined for layer."));
        this.widgets(widgets);
        this._widgetPlacements.push(placement);
        this._widgetRatios.push([widthRatio, heightRatio]);
        return this;
    }
github hpcc-systems / Visualization / packages / chart / src / Column.ts View on Github external
.each(function (this: SVGElement, d) {
                            context.textLocal.set(this, new Text().target(this));
                        });
                    dataTextEnter.merge(dataText as any)
github hpcc-systems / Visualization / packages / layout / src / Tabbed.ts View on Github external
addTab(widget, label, isActive?, callback?) {
        const widgetSize = widget.size();
        if (widgetSize.width === 0 && widgetSize.height === 0) {
            widget.size({ width: "100%", height: "100%" });
        }
        const labels = this.labels();
        const widgets = this.widgets();
        if (isActive) {
            this.activeTabIdx(this.widgets().length);
        }
        labels.push(label);
        const surface = new Surface().widget(widget ? widget : new Text().text("No widget defined for tab"));
        widgets.push(surface);
        this.labels(labels);
        this.widgets(widgets);
        if (callback) {
            callback(surface);
        }
        return this;
    }