Trait

com.google.appsscript.charts

CategoryFilterBuilder

Related Doc: package charts

Permalink

trait CategoryFilterBuilder extends Object

CategoryFilterBuilder A builder for category filter controls. A category filter is a picker to choose one or more between a set of defined values. Given a column of type string, this control will filter out the rows that don't match any of the picked values. Here is an example that creates a table chart a binds a category filter to it. This allows the user to filter the data the table displays.

function doGet() { var app = UiApp.createApplication(); var sampleData = Charts.newDataTable() .addColumn(Charts.ColumnType.STRING, "Month") .addColumn(Charts.ColumnType.NUMBER, "Dining") .addColumn(Charts.ColumnType.NUMBER, "Total") .addRow(["Jan", 60, 520]) .addRow(["Feb", 50, 430]) .addRow(["Mar", 53, 440]) .addRow(["Apr", 70, 410]) .addRow(["May", 80, 390]) .addRow(["Jun", 60, 500]) .addRow(["Jul", 100, 450]) .addRow(["Aug", 140, 431]) .addRow(["Sep", 75, 488]) .addRow(["Oct", 70, 521]) .addRow(["Nov", 58, 388]) .addRow(["Dec", 63, 400]) .build();

var chart = Charts.newTableChart() .setDimensions(600, 500) .build();

var categoryFilter = Charts.newCategoryFilter() .setFilterColumnLabel("Month") .setAllowMultiple(true) .setSortValues(true) .setLabelStacking(Charts.Orientation.VERTICAL) .setCaption('Choose categories...') .build();

var panel = app.createVerticalPanel().setSpacing(10); panel.add(categoryFilter).add(chart);

var dashboard = Charts.newDashboardPanel() .setDataTable(sampleData) .bind(categoryFilter, chart) .build();

dashboard.add(panel); app.add(dashboard); return app; }

For more details, see the Gviz documentation

Annotations
@RawJSType()
Linear Supertypes
Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CategoryFilterBuilder
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def build(): Control

    Permalink

    Builds a control.

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def hasOwnProperty(v: String): Boolean

    Permalink
    Definition Classes
    Object
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  19. def setAllowMultiple(allowMultiple: Boolean): CategoryFilterBuilder

    Permalink

    Sets whether multiple values can be selected, rather than just one.

    Sets whether multiple values can be selected, rather than just one. The default value of this option is true (allowing multiple selection).

  20. def setAllowNone(allowNone: Boolean): CategoryFilterBuilder

    Permalink

    Sets whether the user is allowed not to choose any value.

    Sets whether the user is allowed not to choose any value. If false the user must choose at least one value from the available ones. The default value of this option is true.

  21. def setAllowTyping(allowTyping: Boolean): CategoryFilterBuilder

    Permalink

    Sets whether the user is allowed to type in a text field to narrow down the list of possible choices (via an autocompleter), or not.

    Sets whether the user is allowed to type in a text field to narrow down the list of possible choices (via an autocompleter), or not. The default value of this option is true (allowing the user to type in values in the picker).

  22. def setCaption(caption: String): CategoryFilterBuilder

    Permalink

    Sets the caption to display inside the value picker widget when no item is selected.

  23. def setDataTable(table: DataTableSource): CategoryFilterBuilder

    Permalink

    Sets the control data table, which will be the control's underlying data model.

  24. def setDataTable(tableBuilder: DataTableBuilder): CategoryFilterBuilder

    Permalink

    Sets the data table to use for the control using a DataTableBuilder.

    Sets the data table to use for the control using a DataTableBuilder. This is a convenience method for setting the data table without needing to call build().

  25. def setFilterColumnIndex(columnIndex: Int): CategoryFilterBuilder

    Permalink

    Sets the index of the data table column to filter on.

    Sets the index of the data table column to filter on. The values of that column will determine whether or not each row should be filtered. It is mandatory to set either this or the column label using setFilterColumnLabel(columnLabel).

  26. def setFilterColumnLabel(columnLabel: String): CategoryFilterBuilder

    Permalink

    Sets the label of the data table column to filter on.

    Sets the label of the data table column to filter on. The values of that column will determine whether or not each row should be filtered. It is mandatory to set either this or a column index using setFilterColumnIndex(columnIndex).

  27. def setLabel(label: String): CategoryFilterBuilder

    Permalink

    Sets the label to display next to the slider.

    Sets the label to display next to the slider. If unspecified, the label of the column the control operates on will be used.

  28. def setLabelSeparator(labelSeparator: String): CategoryFilterBuilder

    Permalink

    Sets a separator string appended to the label, to visually separate the label from the category picker.

  29. def setLabelStacking(orientation: Orientation): CategoryFilterBuilder

    Permalink

    Sets whether the label should display above (vertical stacking) or beside (horizontal stacking) the input field.

  30. def setSelectedValuesLayout(layout: PickerValuesLayout): CategoryFilterBuilder

    Permalink

    Sets how to display selected values, when multiple selection is allowed.

  31. def setSortValues(sortValues: Boolean): CategoryFilterBuilder

    Permalink

    Sets whether the values to choose from should be sorted.

  32. def setValues(values: Array[String]): CategoryFilterBuilder

    Permalink

    Sets the list of values (categories) the user can choose from.

  33. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  34. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  35. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  36. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  37. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped