How to use the @hpcc-js/api.I2DAggrChart.call function in @hpcc-js/api

To help you get started, we’ve selected a few @hpcc-js/api 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 / HexBin.ts View on Github external
constructor() {
        super();
        I2DAggrChart.call(this);
        this.tooltipValueFormat_default(",.0f");
        ITooltip.call(this);
        this.tooltipHTML(d => {
            const seriesExtent = d3Extent<{ label: any, value: any }>(d, d => d.label);
            const labelExtent = d3Extent<{ label: any, value: any }>(d, d => d.value);
            return this.tooltipFormat({
                series: seriesExtent[0] === seriesExtent[1] ? seriesExtent[0] : `${seriesExtent[0]} -> ${seriesExtent[1]}`,
                label: labelExtent[0] === labelExtent[1] ? labelExtent[0] : `${labelExtent[0]} -> ${labelExtent[1]}`,
                value: d.length
            });
        });
        this._hexbin = d3HexBin()
            .x(d => d.x)
            .y(d => d.y)
            ;
        this