0

I'm using React webdatarocks pivot table to display data source from remote REST services, the data format is CSV string, I can load json data as data source no problem but when I try csv data it won't work, anyone have similar experience or get solution to solve this ?

halfer
  • 19,824
  • 17
  • 99
  • 186

1 Answers1

0

There’s no way to load CSV data as a string in the component. You can only load it using a physical CSV file or write your own script to return CSV. Here you can see an example of adding data by specifying the URL to your file or script:

    var pivot = new WebDataRocks({
    container: "#wdr-component",
    toolbar: true,
    report: {
        dataSource: {
            // filename: "URL-to-your-CSV-file"
            filename: "URL-to-your-script-that-returns-CSV"
        }
    }
});