Skip to content

Releases: steelbreeze/landscape

Bump pivot and types libraries

19 Apr 06:38
Compare
Choose a tag to compare
3.8.1

Bump type and pivot lib versions

getElement takes full CallbackFunction

09 Mar 18:02
Compare
Choose a tag to compare

The call to getElement takes a callback function akin to those in the Array.prototype.filter function.

Minor refactoring

28 Jan 08:02
Compare
Choose a tag to compare
3.7.1

Prep 3.7.1 release

Externalise leastCommonMultiple

12 Jan 07:44
Compare
Choose a tag to compare

The leastCommonMultiple function has moved into a separate library called math.js.

Revert to passing the method to split cells as a parameter to the table function (which defaults to Math.max, but can be leastCommonMultiple).

Further refactoring.

Bump pivot lib; minor edit to dynamic example

10 Dec 07:43
Compare
Choose a tag to compare

Remove precise param from table function; use @steelbreeze/types

07 Dec 21:13
Compare
Choose a tag to compare

Remove the precise parameter from the table function. This has been replaced with a function setMode.

setMode takes as a parameter a function used to calculate the number of rows or columns to split at cube row or column into when expanding it; the prototype for this function is:

(...values: Array<number>) => number

By default, Math.max is used, but as an alternative, landscape.leastCommonMultiple can also be used to yield more precise rendering (which sadly browser rendering engines don't seem to respect).

Refactoring after last major change

05 Dec 06:52
Compare
Choose a tag to compare

General code tidying and optimisation after last major change.

Simpler data passthrough

03 Dec 17:39
Compare
Choose a tag to compare

Previously, the original source data context that formed a merged cell was passed though in the resultant table; this is not very performant for large datasets, adding considerable overheads when splitting and merging.

In its place, the callback to get the data used to render an element has been enhanced to:

interface Element {
	key: string | number;	// the source in the data that the value property originates
	value: any;		// a value to use for merging cells and the elements text when rendered
	style: string;		// a value to use for merging cells and the elements style when rendered
	text?: string;		// an optional override for the elements text when rendered
}

This provides an ability to derive the source data context filtering using key and value.

Remove maxSplits and replace with param to table function

02 Dec 10:33
Compare
Choose a tag to compare

Add a parameter to the table function to control rough or precise rendering of the table. The precise rendering will split rows or columns into the least common multiple of the counts in that row or column; rough rendering will split rows or columns into the max count of the row or column. Rough is the default.

Control max number of splits

02 Dec 09:49
Compare
Choose a tag to compare

Add a configuration parameter, maxSplits to limit the number of cells an entry can be split into.