How to use the @hpcc-js/common.Utility.SimpleSelectionMixin 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 / graph / src / Sankey.ts View on Github external
exit(domNode, element) {
        super.exit(domNode, element);
    }

    //  Events  ---
    click(row, column, selected) {
        console.log("Click:  " + JSON.stringify(row) + ", " + column + "," + selected);
    }

    dblclick(row, column, selected) {
        console.log("Double Click:  " + JSON.stringify(row) + ", " + column + "," + selected);
    }
}
Sankey.prototype._class += " graph_Sankey";
Sankey.prototype.Column = SankeyColumn;
Sankey.prototype.mixin(Utility.SimpleSelectionMixin);

Sankey.prototype._palette = Palette.ordinal("default");

Sankey.prototype.publish("paletteID", "default", "set", "Palette ID", Sankey.prototype._palette.switch());
Sankey.prototype.publish("mappings", [], "propertyArray", "Source Columns", null, { autoExpand: SankeyColumn });
Sankey.prototype.publish("vertexWidth", 36, "number", "Vertex Width");
Sankey.prototype.publish("vertexPadding", 40, "number", "Vertex Padding");
Sankey.prototype.publish("xAxisMovement", false, "boolean", "Enable x-axis movement");
Sankey.prototype.publish("yAxisMovement", false, "boolean", "Enable y-axis movement");
github hpcc-systems / Visualization / packages / chart / src / WordCloud.ts View on Github external
tooltipLabelColor: { (): string; (_: string): WordCloud };
    tooltipLabelColor_exists: () => boolean;
    tooltipValueColor: { (): string; (_: string): WordCloud };
    tooltipValueColor_exists: () => boolean;
    tooltipTick: { (): boolean; (_: boolean): WordCloud };
    tooltipTick_exists: () => boolean;
    tooltipOffset: { (): number; (_: number): WordCloud };
    tooltipOffset_exists: () => boolean;

    //  SimpleSelectionMixin
    _selection: Utility.SimpleSelection;
}
WordCloud.prototype._class += " chart_WordCloud";
WordCloud.prototype.implements(I2DChart.prototype);
WordCloud.prototype.implements(ITooltip.prototype);
WordCloud.prototype.mixin(Utility.SimpleSelectionMixin);

WordCloud.prototype.publish("paletteID", "default", "set", "Color palette for this widget", WordCloud.prototype._palette.switch(), { tags: ["Basic", "Shared"] });
WordCloud.prototype.publish("useClonedPalette", false, "boolean", "Enable or disable using a cloned palette", null, { tags: ["Intermediate", "Shared"] });

WordCloud.prototype.publish("fontFamily", "Impact", "string", "Font Name", null, { tags: ["Basic"] });
WordCloud.prototype.publish("fontSizeFrom", 6, "number", "Minimum font size (pixels)", null, { tags: ["Basic"] });
WordCloud.prototype.publish("fontSizeTo", 48, "number", "Maximum font size (pixels)", null, { tags: ["Basic"] });
WordCloud.prototype.publish("angleFrom", -60, "number", "Minimum angle (degrees)", null, { tags: ["Basic"] });
WordCloud.prototype.publish("angleTo", 60, "number", "Maximum angle (degrees)", null, { tags: ["Basic"] });
WordCloud.prototype.publish("angleCount", 5, "number", "Number of different angles", null, { tags: ["Basic"] });
WordCloud.prototype.publish("padding", 0, "number", "Padding between words (pixels)", null, { tags: ["Intermediate"] });
WordCloud.prototype.publish("scaleMode", "linear", "set", "Text scaling mode", ["linear", "log", "sqrt", "pow"], { tags: ["Intermediate"] });
WordCloud.prototype.publish("spiral", "archimedean", "set", "Text scaling mode", ["archimedean", "rectangular"], { tags: ["Intermediate"] });
WordCloud.prototype.publish("offsetX", 0, "number", "X offset", null, { tags: ["Advanced"] });
WordCloud.prototype.publish("offsetY", 0, "number", "Y offset", null, { tags: ["Advanced"] });
WordCloud.prototype.publish("zoom", 1, "number", "Zoom", null, { tags: ["Advanced"] });
github hpcc-systems / Visualization / packages / chart / src / Radar.ts View on Github external
strokeColor: (row, column, value) => string;
    textColor: (row, column, value) => string;
    click: (row, column, selected) => void;
    dblclick: (row, column, selected) => void;

    //  ITooltip
    tooltip;
    tooltipHTML: (_) => string;
    tooltipFormat: (_) => string;

    _selection;
}
Radar.prototype._class += " chart_Radar";
Radar.prototype.implements(INDChart.prototype);
Radar.prototype.implements(ITooltip.prototype);
Radar.prototype.mixin(Utility.SimpleSelectionMixin);

export interface Radar {
    labelPaddingRatio(): number;
    labelPaddingRatio(_: number): this;
    fillOpacity(): number;
    fillOpacity(_: number): this;
    fontFamily(): string;
    fontFamily(_: string): this;
    fontSize(): number;
    fontSize(_: number): this;
    valueGuideRatios(): any;
    valueGuideRatios(_: any): this;
    valueGuideFontSize(): number;
    valueGuideFontSize(_: number): this;
    valueGuideFontFamily(): string;
    valueGuideFontFamily(_: string): this;
github hpcc-systems / Visualization / packages / other / src / CalendarHeatMap.ts View on Github external
dateColumn: { (): string; (_: string): CalendarHeatMap };
    dateColumn_exists: () => boolean;
    datePattern: { (): string; (_: string): CalendarHeatMap };
    datePattern_exists: () => boolean;
    aggrType: { (): string; (_: string): CalendarHeatMap };
    aggrType_exists: () => boolean;
    aggrColumn: { (): string; (_: string): CalendarHeatMap };
    aggrColumn_exists: () => boolean;
    aggrDeltaColumn: { (): string; (_: string): CalendarHeatMap };
    aggrDeltaColumn_exists: () => boolean;

    //  SimpleSelectionMixin
    _selection;
}
CalendarHeatMap.prototype._class += " other_CalendarHeatMap";
CalendarHeatMap.prototype.mixin(Utility.SimpleSelectionMixin);
CalendarHeatMap.prototype._palette = Palette.rainbow("default");

export interface CalendarHeatMap {
    dayStrokeColor(): string;
    dayStrokeColor(_: string): this;
    monthStrokeColor(): string;
    monthStrokeColor(_: string): this;
    dayStrokeWidth(): number;
    dayStrokeWidth(_: number): this;
    monthStrokeWidth(): number;
    monthStrokeWidth(_: number): this;
}
CalendarHeatMap.prototype.publish("paletteID", "YlOrRd", "set", "Color palette for this widget", CalendarHeatMap.prototype._palette.switch(), { tags: ["Basic", "Shared"] });
CalendarHeatMap.prototype.publish("dayStrokeColor", "#ccc", "html-color", "Color of day border");
CalendarHeatMap.prototype.publish("monthStrokeColor", "#000", "html-color", "Color of month border");
CalendarHeatMap.prototype.publish("dayStrokeWidth", 1, "number", "Pixel width of day border");
github hpcc-systems / Visualization / packages / timeline / src / MiniGantt.ts View on Github external
}

    updateEntityRect(textbox: EntityRect, d) {
    }

    //  ITooltip  ---
    tooltip;
    tooltipHTML: (_) => string;
    tooltipFormat: (_) => string;

    //  SimpleSelectionMixin
    _selection;
}
MiniGantt.prototype._class += " timeline_MiniGantt";
MiniGantt.prototype.implements(ITooltip.prototype);
MiniGantt.prototype.mixin(Utility.SimpleSelectionMixin);

export interface MiniGantt {
    timePattern(): string;
    timePattern(_: string): this;
    tickFormat(): string;
    tickFormat(_: string): this;
    tickFormat_exists(): boolean;
    tooltipTimeFormat(): string;
    tooltipTimeFormat(_: string): this;
    overlapTolerence(): number;
    overlapTolerence(_: number): this;
    orientation(): string;
    orientation(_: string): this;
    rangeFontColor(): string;
    rangeFontColor(_: string): this;
    titleColumn(): string;
github hpcc-systems / Visualization / packages / chart / src / Bullet.ts View on Github external
constructor() {
        super();
        Utility.SimpleSelectionMixin.call(this, true);
    }
github hpcc-systems / Visualization / packages / map / src / Pins.ts View on Github external
constructor() {
        super();
        Utility.SimpleSelectionMixin.call(this);
        this._geohash = new MapUtility.Geohash();
    }
github hpcc-systems / Visualization / packages / map / src / leaflet / FeatureLayer.ts View on Github external
constructor(cluster = false) {
        super();
        this._layer = cluster ? new MarkerClusterGroup() : new FeatureGroup();
        (this._layer as any).__hpcc_layer = this;
        Utility.SimpleSelectionMixin.call(this);
        this.layers([this]);
    }
github hpcc-systems / Visualization / packages / tree / src / Treemap.ts View on Github external
constructor() {
        super();
        ITree.call(this);
        Utility.SimpleSelectionMixin.call(this);
    }
github hpcc-systems / Visualization / packages / chart / src / Radar.ts View on Github external
constructor() {
        super();
        INDChart.call(this);
        ITooltip.call(this);
        Utility.SimpleSelectionMixin.call(this);
    }