API Docs for: 0.6.0
Show:

sgvizler.datatable Class

Contains functions for datatable manipulation.

Item Index

Methods

Methods

pivot

(
  • data
)
google.visualization.DataTable public

Defined in src/datatable/pivot.js:1

Available since 0.6.0

This function is a modified version of http://jsfiddle.net/asgallant/HkjDe/ A discussion is here https://groups.google.com/forum/?fromgroups=#!topic/google-visualization-api/jl_5JpODmw8

pivot gets in input a Google DataTable. Table must have 3 columns. Pivoting the table will swap all the rows of the first colum as columns for the new table and all the rows of the second column as the rows of the new table. The aggregate function is the sum. So, borrowing data form the discussion above:

Equipment   Location  Count 
e1          c1        6
e2          c1        2
e3          c1        1
e4          c1        3
e1          c2        7
e2          c2        3
e1          c3        8
e2          c3        4

    E1  E2  E3  E4
C1  XX  xx  xx  xx
C2  xx  xx   0  xx
C3   0  xx  xx  xx

Parameters:

  • data google.visualization.DataTable

Returns:

google.visualization.DataTable:

prefixify

(
  • data
)
google.visualization.DataTable public

Defined in src/datatable/prefixify.js:2

Available since 0.6.0

Walks through all cells of columns with datatype string and runs prefixify, which replaces namespace with its prefix.

Parameters:

  • data google.visualization.DataTable

Returns:

google.visualization.DataTable: