plugin-tableview

plugin-tableview

new plugin-tableview(options) → {TableView}

Description:
  • Table view plugin.
    Generates table view for bound dataset.

    • NOTE:
      • Plugins aren't built-in. Need to be loaded or imported to be used.
      • Non required modules from billboard.js core, need to be installed separately.
Source:
Examples
// Plugin must be loaded before the use.
<script src="$YOUR_PATH/plugin/billboardjs-plugin-tableview.js"></script>

 var chart = bb.generate({
    ...
    plugins: [
       new bb.plugin.tableview({
         selector: "#my-table-view",
         categoryTitle: "Category",
         categoryFormat: function(v) {
             // do some transformation
             ...
             return v;
         },
         class: "my-class-name",
         style: true,
         title: "My Data List",
         updateOnToggle: false,
         nullString: "N/A"
       }),
    ]
 });
import {bb} from "billboard.js";
import TableView from "billboard.js/dist/billboardjs-plugin-tableview";

bb.generate({
    ...
    plugins: [
       new TableView({ ... })
    ]
})
Parameters:
Name Type Description
options object

table view plugin options

Returns:
Type
TableView

Extends

Members

(static) categoryFormat :function

Description:
  • Set category text format function.

Source:
Default Value:
  • function(v) { // will return formatted value according x Axis type }}

Set category text format function.

Type:
  • function
Example
categoryFormat: "#table-holder"

(static) categoryTitle :string

Description:
  • Set category title text

Source:
Default Value:
  • "Category"

Set category title text

Type:
  • string
Example
categoryTitle: "#table-holder"

(static) class :string

Description:
  • Set tableview holder class name.

Source:
Default Value:
  • undefined

Set tableview holder class name.

Type:
  • string
Example
class: "table-class-name"

(static) nullString :string

Description:
  • Set how null value to be shown.

Source:
Default Value:
  • "-"

Set how null value to be shown.

Type:
  • string
Example
nullString: "N/A"

(static) selector :string

Description:
  • Set tableview holder selector.

    • NOTE: If not set, will append new holder element dynamically right after chart element.
Source:
Default Value:
  • undefined

Set tableview holder selector.

  • NOTE: If not set, will append new holder element dynamically right after chart element.
Type:
  • string
Example
selector: "#table-holder"

(static) style :boolean

Description:
  • Set to apply default style(.bb-tableview) to tableview element.

Source:
Default Value:
  • true

Set to apply default style(.bb-tableview) to tableview element.

Type:
  • boolean
Example
style: false

(static) title :string

Description:
  • Set tableview title text.

    • NOTE: If set title.text, will be used when this option value is empty.
Source:
Default Value:
  • undefined

Set tableview title text.

  • NOTE: If set title.text, will be used when this option value is empty.
Type:
  • string
Example
title: "Table Title Text"

(static) updateOnToggle :boolean

Description:
  • Update tableview from data visibility update(ex. legend toggle).

Source:
Default Value:
  • true

Update tableview from data visibility update(ex. legend toggle).

Type:
  • boolean
Example
legendToggleUpdate: false