Layout - PivotBuilder
Layout.PivotBuilderDefine a UI Pivot Table & Chart from a
Stream within a LayoutBuilder.Example
// use a DictType stream
const stream = Stream(
"My Stream",
DictType(
StringType,
StructType({
date: DateTimeType,
})
)
);
// create a upload in a layout
const layout = new LayoutBuilder("My Layout")
.pivot("My Pivot", builder => builder
.fromStream(stream)
)
.toTemplate()
Layout
constructor
• new PivotBuilder(name, module):
PivotBuilder
Define a UI Pivot Table & Chart from a
Stream within a LayoutBuilder.Parameters
| Name | Type |
|---|---|
name | string |
module | ModulePath |
Returns
PivotBuilder
Example
// use a DictType stream
const stream = Stream(
"My Stream",
DictType(
StringType,
StructType({
date: DateTimeType,
})
)
);
// create a upload in a layout
const layout = new LayoutBuilder("My Layout")
.pivot("My Pivot", builder => builder
.fromStream(stream)
)
.toTemplate()
fromStream
▸ fromStream(...streams): PivotFinalizer
Define the
Stream to build a PivotBuilder within a LayoutBuilder.Parameters
| Name | Type |
|---|---|
...streams | Stream<ArrayType | DictType>[] |
Returns
PivotFinalizer
Example
// use a DictType stream
const stream = Stream(
"My Stream",
DictType(
StringType,
StructType({
date: DateTimeType,
})
)
);
// create a upload in a layout
const layout = new LayoutBuilder("My Layout")
.pivot("My Pivot", builder => builder
.fromStream(stream)
)
.toTemplate()