Example of Local Data in ASP.NET MVC Pivot Table Control
This sample demonstrates basic rendering of the pivot table bound to JSON or CSV data extracted from a local file.
Content Type:
|
|
Biomass | Free Energy | Grand Total | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Bio-diesel | Ethenol Fuel | Wastage | Wood | Biomass Total | Geo-thermal | Hydro-electric | Solar | Wind | Free Energy Total | |||||||||||||
Units (GWh) | Cost (MM) | Units (GWh) | Cost (MM) | Units (GWh) | Cost (MM) | Units (GWh) | Cost (MM) | Units (GWh) | Cost (MM) | Units (GWh) | Cost (MM) | Units (GWh) | Cost (MM) | Units (GWh) | Cost (MM) | Units (GWh) | Cost (MM) | Units (GWh) | Cost (MM) | Units (GWh) | Cost (MM) | |
FY 2015 | 331 | $438 | 167 | $275 | 164 | $252 | 49 | $78 | 711 | $1,043 | 520 | $690 | 994 | $1,041 | 2,619 | $2,080 | 5,419 | $2,656 | 9,552 | $6,467 | 10,263 | $7,510 |
FY 2016 | 254 | $344 | 209 | $331 | 235 | $335 | 82 | $126 | 780 | $1,136 | 463 | $697 | 1,196 | $1,090 | 2,771 | $2,079 | 4,731 | $2,351 | 9,161 | $6,217 | 9,941 | $7,353 |
FY 2017 | 369 | $565 | 217 | $401 | 258 | $367 | 75 | $122 | 919 | $1,455 | 469 | $644 | 963 | $907 | 2,117 | $1,734 | 4,863 | $2,445 | 8,412 | $5,730 | 9,331 | $7,185 |
FY 2018 | 88 | $92 | 2 | $24 | 55 | $89 | 20 | $23 | 165 | $228 | 76 | $84 | 225 | $206 | 422 | $317 | 558 | $214 | 1,281 | $821 | 1,446 | $1,049 |
Grand Total | 1,042 | $1,439 | 595 | $1,031 | 712 | $1,043 | 226 | $349 | 2,575 | $3,862 | 1,528 | $2,115 | 3,378 | $3,244 | 7,929 | $6,210 | 15,571 | $7,666 | 28,406 | $19,235 | 30,981 | $23,097 |
The pivot table supports JSON and CSV data source. The
dataSourceSettings->dataSource
property can be assigned with the source data to populate the pivot table.
In this demo, the JSON and CSV data is assigned from an external file.