loads data into Pivot from an external file
path | string | the path to an external file |
mode | string|function | optional, the type of data to load: "json" (default) or "csv", or a data driver constructor |
object | a promise object |
// default loading
pivot.load("dataset.json");
// loading from a CSV file
pivot.load("dataset.csv", "csv");
// loading from a CSV file with a data driver
pivot.load("../common/dataset.csv", new dhx.data.CsvDriver({
names:["name","year","continent","form","gdp","oil","balance","when"]
}));
Related sample: Load data in JSON and CSV formats