A dataSource
object contains the information about the data source of the report.
Name | Type | Description |
---|---|---|
filename | String | optional The URL to JSON or CSV file. Also can be the URL to the server-side script generating the data. |
fieldSeparator | String | optional 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. |
data | String | optional 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. |
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.