Features

DataEngine Service(DataSource)

DataEngine Service(DataSource)

The PivotEngine component binds to a DataEngine Web API and an in-memory data.

Features

Settings

Description

In this sample, the PivotEngine component binds to a service. Now only the DataEngine Web API is supported.
The service-url attribute should be set 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 show 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 set the service-url attribute in the tag.
Otherwise, please set the source-collection attribute or the read-action-url attribute used in the tag in the Index page and the RemoteBind page.

using Microsoft.AspNetCore.Mvc;

namespace OlapExplorer.Controllers.Olap
{
    partial class OlapController : Controller
    {
        // GET: PivotGrid
        public ActionResult DataSource()
        {
            OlapModel.ControlId = "dataSourcePanel";
            ViewBag.DemoOptions = OlapModel;
            return View();
        }
    }
}
@{
    ClientSettingsModel optionsModel = ViewBag.DemoOptions;
}

<c1-pivot-engine id="dataSourceEngine" service-url="~/api/dataengine/dataset10">
    <c1-view-field-collection c1-property="RowFields" items="Country"></c1-view-field-collection>
    <c1-view-field-collection c1-property="ColumnFields" items="Product"></c1-view-field-collection>
    <c1-view-field-collection c1-property="ValueFields" items="Sales"></c1-view-field-collection>
</c1-pivot-engine>

<div class="row">
    <div class="col-sm-4 col-md-4">
        <c1-pivot-panel id="@(optionsModel.ControlId)" items-source-id="dataSourceEngine"></c1-pivot-panel>
    </div>
    <div class="col-sm-8 col-md-8">
        <c1-pivot-grid id="indexGrid" items-source-id="dataSourceEngine"></c1-pivot-grid>
    </div>
</div>

@section Settings{
    @Html.Partial("_OptionsMenu", optionsModel)
}

@section Description{
<p>@Html.Raw(OlapRes.DataSource_Text0)</p>

<p>@Html.Raw(OlapRes.DataSource_Text1)</p>

<p>@Html.Raw(OlapRes.DataSource_Text2)</p>

}
@section Summary{
<p>@Html.Raw(OlapRes.DataSource_Text3)</p>

}