@ScriptApi public class PivotWidgetBuilder extends Object
Constructor and Description |
---|
PivotWidgetBuilder(Table tableToPivot,
String row,
String columnTitleColumn,
String valueColumn)
Creates a Pivot Widget Builder.
|
Modifier and Type | Method and Description |
---|---|
PivotWidgetBuilder |
across()
Shorthand to turn on across aggregation.
|
PivotWidgetBuilder |
across(boolean value)
Indicates whether or not to aggregate across.
|
PivotWidgetBuilder |
addFilterColumns(String... filterColumns)
Adds one or more filter column sto the Pivot Widget.
|
PivotWidgetBuilder |
addRows(String... rows)
Adds one or more rows to the Pivot Widget.
|
PivotWidgetBuilder |
addValueColumns(String... valueColumns)
Adds one or more value column sto the Pivot Widget.
|
PivotWidgetBuilder |
avg()
Sets the aggregation to AVERAGE.
|
PivotWidgetBuilder |
colorRowColumns()
If a heatmap is being displayed, this will color the row columns as well.
|
PivotWidgetBuilder |
down()
Shorthand to turn on down aggregation.
|
PivotWidgetBuilder |
down(boolean value)
Indicates whether or not to aggregate down.
|
PivotWidgetBuilder |
heatMap()
Display a heat map with default coloring.
|
PivotWidgetBuilder |
heatMap(boolean value)
Indicates whether or not to display a heat map.
|
PivotWidgetBuilder |
heatMap(boolean value,
com.illumon.iris.gui.color.Color minColor,
com.illumon.iris.gui.color.Color maxColor)
If
value is true, display a heat map with the given colors. |
PivotWidgetBuilder |
heatMap(com.illumon.iris.gui.color.Color minColor,
com.illumon.iris.gui.color.Color maxColor)
Display a heat map with the given colors.
|
static PivotWidgetBuilder |
pivot(Table tableToPivot,
String row,
String columnTitleColumn,
String unitColumn)
Starts a Pivot Widget Builder.
|
PivotWidgetBuilder |
setColorFormat(Function<Object,Object> colorFormat)
Sets the Color Format for the Pivot Widget.
|
PivotWidgetBuilder |
setColumnNameTransform(Function<Object,Object> columnNameTransform)
Sets a transform to rename columns in the Pivot Widget.
|
PivotWidgetBuilder |
setMainDecimalFormat(String format)
Sets the decimal format for the main table.
|
PivotWidgetBuilder |
setMainIntegerFormat(String format)
Sets the integer format for the main table.
|
PivotWidgetBuilder |
setRowDecimalFormat(String format)
Sets the decimal format for the row table
|
PivotWidgetBuilder |
setRowIntegerFormat(String format)
Sets the integer format for the row table
|
PivotWidgetBuilder |
setTotalsDecimalFormat(String format)
Sets the decimal format for the totals table
|
PivotWidgetBuilder |
setTotalsIntegerFormat(String format)
Sets the integer format for the totals table
|
LiveWidget |
show()
Shows the Pivot Widget.
|
PivotWidgetBuilder |
sortColumnTitles()
Sort Column Titles Ascending
|
PivotWidgetBuilder |
sortColumnTitlesDescending()
Sort Column Titles Descending
|
PivotWidgetBuilder |
sortRows()
Sort Row Columns Ascending
|
PivotWidgetBuilder |
sortRowsDescending()
Sort Row Columns Descending
|
PivotWidgetBuilder |
sum()
Sets the aggregation to SUM.
|
PivotWidgetBuilder |
totals(boolean value)
Indicates whether or not display totals.
|
PivotWidgetBuilder |
unique()
Sets the aggregation to UNIQUE.
|
@ScriptApi public PivotWidgetBuilder(Table tableToPivot, String row, String columnTitleColumn, String valueColumn)
tableToPivot
- the table to pivotrow
- a key column for the rows, more can be added using PivotWidgetBuilder.addRows(String...)
columnTitleColumn
- the column used as a title for each columnvalueColumn
- a column containing values of interest, more can be added using PivotWidgetBuilder.addValueColumns(String...)
@ScriptApi public static PivotWidgetBuilder pivot(Table tableToPivot, String row, String columnTitleColumn, String unitColumn)
tableToPivot
- the table to pivotrow
- a key column for the rows, more can be added using PivotWidgetBuilder.addRows(String...)
columnTitleColumn
- the column used as a title for each columnunitColumn
- a column containing values of interest, more can be added using PivotWidgetBuilder.addValueColumns(String...)
@ScriptApi public LiveWidget show()
@ScriptApi public PivotWidgetBuilder addRows(String... rows)
rows
- key columns for the rows@ScriptApi public PivotWidgetBuilder addValueColumns(String... valueColumns)
valueColumns
- columns containing values of interest@ScriptApi public PivotWidgetBuilder addFilterColumns(String... filterColumns)
filterColumns
- columns to be used for filtering@ScriptApi public PivotWidgetBuilder sum()
@ScriptApi public PivotWidgetBuilder avg()
@ScriptApi public PivotWidgetBuilder unique()
@ScriptApi public PivotWidgetBuilder across(boolean value)
value
- true to aggregate across@ScriptApi public PivotWidgetBuilder across()
@ScriptApi public PivotWidgetBuilder down(boolean value)
value
- true to aggregate down@ScriptApi public PivotWidgetBuilder down()
@ScriptApi public PivotWidgetBuilder totals(boolean value)
value
- true to display totals@ScriptApi public PivotWidgetBuilder sortRows()
@ScriptApi public PivotWidgetBuilder sortRowsDescending()
@ScriptApi public PivotWidgetBuilder sortColumnTitles()
@ScriptApi public PivotWidgetBuilder sortColumnTitlesDescending()
@ScriptApi public PivotWidgetBuilder heatMap()
@ScriptApi public PivotWidgetBuilder heatMap(com.illumon.iris.gui.color.Color minColor, com.illumon.iris.gui.color.Color maxColor)
minColor
- foreground color at or below the minimum value of the heat mapmaxColor
- foreground color at or below the maximum value of the heat map@ScriptApi public PivotWidgetBuilder heatMap(boolean value)
value
is true, this heat map will the use default colors.value
- true to display a heat map@ScriptApi public PivotWidgetBuilder heatMap(boolean value, com.illumon.iris.gui.color.Color minColor, com.illumon.iris.gui.color.Color maxColor)
value
is true, display a heat map with the given colors.
If value
is false, do not display a heat map.value
- true to display a heat mapminColor
- foreground color at or below the minimum value of the heat mapmaxColor
- foreground color at or below the maximum value of the heat map@ScriptApi public PivotWidgetBuilder setMainDecimalFormat(String format)
format
- the decimal format for the main table@ScriptApi public PivotWidgetBuilder setRowDecimalFormat(String format)
format
- the decimal format for the row table@ScriptApi public PivotWidgetBuilder setTotalsDecimalFormat(String format)
format
- the decimal format for the totals table@ScriptApi public PivotWidgetBuilder setMainIntegerFormat(String format)
format
- the integer format for the main table@ScriptApi public PivotWidgetBuilder setRowIntegerFormat(String format)
format
- the integer format for the row table@ScriptApi public PivotWidgetBuilder setTotalsIntegerFormat(String format)
format
- the integer format for the totals table@ScriptApi public PivotWidgetBuilder setColumnNameTransform(Function<Object,Object> columnNameTransform)
columnNameTransform
- the column name transform@ScriptApi public PivotWidgetBuilder setColorFormat(Function<Object,Object> colorFormat)
colorFormat
- the color format@ScriptApi public PivotWidgetBuilder colorRowColumns()