Skip to content
zehavibarak edited this page Oct 27, 2022 · 1 revision
<bizdoc-cube-matrix
    [cube]='cube'
    [xAxis]='xAxis' 
    [series]='series'
    [indices]='indices' 
    [sum]='sum' 
    [filters]='axes'
    [scope]='scope'
    (explore)='explore($event)'
    [(loading)]='loading'>
</bizdoc-cube-matrix>

Properties

Name Usage
xAxis Columns axis name
series Rows axis name
filters Axes map
sum Summary or array of summary settings
indices Index or array of index names
indexAt 'series' or 'xAxis'. Default to 'series'
placeAt 'leading' or 'trailing'. Default to leading
scope Positions, Patterns or none
seriesTotalLabel Rows total label
xAxisTotalLabel Columns total label

Sum settings

Set one or more calculated columns / rows.

@Component()
export class AppComponent {
  readonly sum = { 
    title: 'YTD',
    axis: 'xAxis',
    value: 'M03'
  } as SumSettings;
}
Name Usage
value Axis value to sum
axis Required. 'xAxis' or 'series'
calculate 'month', 'quarter', 'year', 'accumulate' or a function
accumulate Set to false to disable totals
explorable Default true.
format One of 'currency', 'number' or 'percent'
precision Angular digits info expression
title Required. Title

Calculate Function

@Component()
export class AppComponent {
  private _avg(key: string, data: { [series: string]: { [xAxis: string]: number; }) : number {
    const series = data[key];
    const total = Object.keys(series).sum(key => 
        series[key] || 0);
    return total / Object.keys(series).length;
  }
  readonly sum = [{ 
    title: 'Avg.',
    axis: 'xAxis',
    calculate: this._avg;
  }] as SumSettings[];
}

Methods

refresh()

Reloads server results.

export()

Downloads Excel file.

Events

explore()

Accepts AxisClickEvent with AxesMap and index name.

loadingChange()

Returns boolean value when loading starts or ends.

Release Notes

Angular npm, Flutter pub.dev and Nuget packages.

Clone this wiki locally