g1.types

g1.types(data) returns the column data types. For example:

var data = [
  { a: 1, b: 1.1, c: "c", d: "2014-04-04", e: true, f: new Date() },
  { a: 2, b: 2 },
];
g.types(data); // {"a":"number","b":"number","c":"string","d":"string","e":"boolean","f":"date"}
g1.types(data, { convert: true }); // {"a":"number","b":"number","c":"string","d":"date","e":"boolean","f":"date"}

g1.types options

types() accepts 2 parameters:

Rules: