Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions PivotController/PivotController/Controllers/PivotController.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
Expand Down Expand Up @@ -62,17 +62,19 @@ public async Task<object> GetData(FetchData param)
{
cacheEntry.SetSize(1);
cacheEntry.AbsoluteExpiration = DateTimeOffset.UtcNow.AddMinutes(60);

// Here, you can refer different kinds of data sources. We've bound a collection in this illustration.
return new DataSource.PivotViewData().GetVirtualData();

// EXAMPLE:
// Other data sources, such as DataTable, CSV, JSON, etc., can be bound as shown below.
// return new DataSource.BusinessObjectsDataView().GetDataTable();
// return new DataSource.PivotJSONData().ReadJSONData(_hostingEnvironment.ContentRootPath + "\\DataSource\\sales-analysis.json");
// return new DataSource.PivotCSVData().ReadCSVData(_hostingEnvironment.ContentRootPath + "\\DataSource\\sales.csv");
// return new DataSource.PivotJSONData().ReadJSONData("http://cdn.syncfusion.com/data/sales-analysis.json");
// return new DataSource.PivotCSVData().ReadCSVData("http://cdn.syncfusion.com/data/sales-analysis.csv");
// Other data sources, such as ExpandoObject, DynamicObject, DataTable, CSV, JSON, etc., can be bound as shown below.
//return new DataSource.PivotDynamicData().GetDynamicData();
//return new DataSource.PivotExpandoData().GetExpandoData();
//return new DataSource.GroupData().GetGroupData();
//return new DataSource.BusinessObjectsDataView().GetDataTable();
//return new DataSource.PivotJSONData().ReadJSONData(_hostingEnvironment.ContentRootPath + "\\DataSource\\sales-analysis.json");
//return new DataSource.PivotCSVData().ReadCSVData(_hostingEnvironment.ContentRootPath + "\\DataSource\\sales.csv");
//return new DataSource.PivotJSONData().ReadJSONData("http://cdn.syncfusion.com/data/sales-analysis.json");
//return new DataSource.PivotCSVData().ReadCSVData("http://cdn.syncfusion.com/data/sales-analysis.csv");
});
}

Expand Down
Loading