Data Source Object

A dataSource object contains the information about the data source of the report.

Properties

NameTypeDescription
filenameStringoptional The URL to JSON or CSV file. Also can be the URL to the server-side script generating the data.
fieldSeparatorStringoptional Specific field delimiter for CSV data. By default, WebDataRocks can parse comma-separated values or semicolon-separated values. For all other cases, fieldSeparator should be specified.
dataStringoptional Property to specify JSON data. WebDataRocks supports a certain kind of JSON data – array of objects, where each object is an unordered collection of KEY/VALUE pairs.

Example

Connect to a CSV file in WebDataRocks reporting tool:

var pivot = new WebDataRocks({
container: "#wdr-component",
toolbar: true,
height: 395,
report: {
dataSource: {
filename: "https://cdn.webdatarocks.com/data/data.csv"
}
}
});

Try it out on CodePen.