How to use the @hpcc-js/common.Icon 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
if (item.prototype instanceof HTMLWidget || item.prototype instanceof SVGWidget) {
                        switch (item.prototype.constructor) {
                            case Text:
                                renderSmall(new Text().text("Hello\nand\nWelcome!"));
                                break;
                            case Shape:
                                renderIcon(new Shape());
                                break;
                            case FAChar:
                                renderIcon(new FAChar().char("\uf007"));
                                break;
                            case TextBox:
                                renderSmall(new TextBox().text("Hello\nand\nWelcome!"));
                                break;
                            case Icon:
                                renderIcon(new Icon().faChar("\uf007"));
                                renderIcon(new Icon()
                                    .diameter(60)
                                    .imageUrl("http://3.bp.blogspot.com/-OafJIIN-DDk/Twteb5onPkI/AAAAAAAAB3Q/vRaUgxkbgWc/s1600/The_Shmoo_by_zombiegoon.jpg")
                                );
                                break;
                            case Image:
                                renderSmall(new Image()
                                    .source("http://3.bp.blogspot.com/-OafJIIN-DDk/Twteb5onPkI/AAAAAAAAB3Q/vRaUgxkbgWc/s1600/The_Shmoo_by_zombiegoon.jpg")
                                    .sizing("fit")
                                    .lockAspectRatio(false)
                                );
                                break;
                            case List:
                                renderSmall(new List()
                                    .data(menuList)
                                );
github hpcc-systems / Visualization / tests / test-layout / src / layout.spec.ts View on Github external
.data(data.ND.subjects.data)
                                    )
                                    ));
                                break;
                            case Modal:
                                render(new Modal()
                                    .widget(new Pie()
                                        .columns(data.TwoD.subjects.columns)
                                        .data(data.TwoD.subjects.data)
                                    )
                                );
                                break;
                            case Popup:
                                render(new Popup()
                                    .widget(new Surface()
                                        .widget(new Icon()
                                            .faChar("\uF007")
                                        )
                                    )
                                );
                                break;
                            case Tabbed:
                                render(new Tabbed()
                                    .addTab(new Pie()
                                        .columns(data.TwoD.subjects.columns)
                                        .data(data.TwoD.subjects.data)
                                        , "Pie Chart", true)
                                    .addTab(
                                        new Line()
                                            .columns(data.ND.subjects.columns)
                                            .data(data.TwoD.subjects.data)
                                        , "Line Chart")
github hpcc-systems / Visualization / tests / test-common / src / common.spec.ts View on Github external
switch (item.prototype.constructor) {
                            case Text:
                                renderSmall(new Text().text("Hello\nand\nWelcome!"));
                                break;
                            case Shape:
                                renderIcon(new Shape());
                                break;
                            case FAChar:
                                renderIcon(new FAChar().char("\uf007"));
                                break;
                            case TextBox:
                                renderSmall(new TextBox().text("Hello\nand\nWelcome!"));
                                break;
                            case Icon:
                                renderIcon(new Icon().faChar("\uf007"));
                                renderIcon(new Icon()
                                    .diameter(60)
                                    .imageUrl("http://3.bp.blogspot.com/-OafJIIN-DDk/Twteb5onPkI/AAAAAAAAB3Q/vRaUgxkbgWc/s1600/The_Shmoo_by_zombiegoon.jpg")
                                );
                                break;
                            case Image:
                                renderSmall(new Image()
                                    .source("http://3.bp.blogspot.com/-OafJIIN-DDk/Twteb5onPkI/AAAAAAAAB3Q/vRaUgxkbgWc/s1600/The_Shmoo_by_zombiegoon.jpg")
                                    .sizing("fit")
                                    .lockAspectRatio(false)
                                );
                                break;
                            case List:
                                renderSmall(new List()
                                    .data(menuList)
                                );
                                break;
github hpcc-systems / Visualization / packages / graph / src / Vertex.ts View on Github external
constructor() {
        super();

        this._icon = new Icon();
        this._textBox = new TextBox();
        this._annotationWidgets = {};
        this.pos({ x: undefined, y: undefined });
    }
github hpcc-systems / Visualization / packages / graph / src / Vertex.ts View on Github external
.each(function (_d, idx) {
                    context._annotationWidgets[idx] = new Icon()
                        .target(this)
                        .shape("square")
                        ;
                })
                ;