plugin-tableview

plugin-tableview

new plugin-tableview(options) → {TableView}

Source:

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.
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
       }),
    ]
 });
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

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

Source:
Default Value:
  • "Category"

Set category title text

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

(static) class :string

Source:
Default Value:
  • undefined

Set tableview holder class name.

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

(static) selector :string

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

Source:
Default Value:
  • true

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

Type:
  • boolean
Example
style: false

(static) title :string

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

Source:
Default Value:
  • true

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

Type:
  • boolean
Example
legendToggleUpdate: false