DataEngine Service(DataEngine)

DataEngine Service(DataEngine)

The PivotEngine component binds to DataEngine Web API and DataEngine data.




In this sample, the PivotEngine component binds to a service. Here, only the DataEngine Web API is supported,
which is responsibe for data aggregation.
The service url should be provided in this mode.
You can get the details about how to deploy the DataEngine service in the DataEngine Web API documentation.

In this sample, the PivotEngine component connects to the DataEngine data.
The PivotPanel control, the PivotGrid control and the PivotChart control are bound to the PivotEngine.
You can change the view definition in the PivotPanel control.
The aggregated data will be obtained from the service.
Then the PivotGrid control and the PivotChart control display the aggregated data.
You can find the detailed raw data shown in a grid by double-clicking a cell in the PivotGrid control.

When the data row count is greater than 10,000, in order to get good performance, we recommend you use BindService(url) mode.
Otherwise, please use Bind(data) or Bind(url).

using C1.Web.Mvc.Olap;
using OlapExplorer.Models;
using System.Collections.Generic;
using System.Web.Mvc;

namespace OlapExplorer.Controllers.Olap
    partial class OlapController : Controller
        private static Dictionary<string, object[]> ChartSettings = new Dictionary<string, object[]>
            {"ChartType", new object[] { PivotChartType.Column, PivotChartType.Area, PivotChartType.Bar, PivotChartType.Line, PivotChartType.Pie, PivotChartType.Scatter} }

        // GET: PivotGrid
        public ActionResult DataEngine()
            var engineModel = new ClientSettingsModel { Settings = new Dictionary<string, object[]>() };
            foreach (var item in OlapModel.Settings)
            foreach (var chartItem in ChartSettings)
            engineModel.ControlId = "chart";
            ViewBag.DemoSettingsModel = engineModel;
            return View();
    ClientSettingsModel optionsModel = ViewBag.DemoSettingsModel;

        .RowFields(pfcb => pfcb.Items("Country"))
        .ColumnFields(cfcb => cfcb.Items("Product"))
        .ValueFields(vfcb => vfcb.Items("Sales")))

<div class="row">
    <div class="col-sm-4 col-md-4">
    <div class="col-sm-8 col-md-8">

@section Description{



@section Summary{