Features

DataEngine Service(SSAS)

DataEngine Service(SSAS)

The PivotEngine component binds to a DataEngine Web API and cube 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 a cube DataEngine data.
The cube DataEngine data is configurated in the Statup file of the application.
If you want to customize the fields for a cube data, you need add in the tag.
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 in the tag used in the Index page and the RemoteBind page.

using Microsoft.AspNetCore.Mvc;

namespace OlapExplorer.Controllers.Olap
{
    partial class OlapController : Controller
    {
        // GET: PivotGrid
        public ActionResult SSAS()
        {
            OlapModel.ControlId = "ssasPanel";
            ViewBag.DemoOptions = OlapModel;
            return View();
        }
    }
}
@using C1.Web.Mvc.Grid
@{
    ClientSettingsModel optionsModel = ViewBag.DemoOptions;
}
<c1-pivot-engine id="ssasEngine" service-url="~/api/dataengine/cube"  show-row-totals="Subtotals" show-column-totals="Subtotals">
    <c1-pivot-field-collection>
        <c1-cube-field header="Internet Orders" dimension-type="Measure">
            <c1-cube-field binding="[Measures].[Internet Order Count]" header="Internet Order Count" type="DataType.Number" dimension-type="Measure"></c1-cube-field>
        </c1-cube-field>
        <c1-cube-field header="Product" dimension-type="Dimension">
            <c1-cube-field binding="[Product].[Category]" header="Category" type="DataType.String" dimension-type="Hierarchy"></c1-cube-field>
            <c1-cube-field header="Stocking">
                <c1-cube-field binding="[Product].[Color]" header="Color" type="DataType.String" dimension-type="Hierarchy"></c1-cube-field>
                <c1-cube-field binding="[Product].[Class]" header="Class" type="DataType.String" dimension-type="Hierarchy"></c1-cube-field>
            </c1-cube-field>
            <c1-cube-field binding="[Product].[Product]" header="Product" type="DataType.String" dimension-type="Hierarchy"></c1-cube-field>
        </c1-cube-field>
    </c1-pivot-field-collection>
    <c1-view-field-collection c1-property="RowFields" items="[Product].[Product]"></c1-view-field-collection>
    <c1-view-field-collection c1-property="ValueFields" items="[Measures].[Internet Order Count]"></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="ssasEngine"></c1-pivot-panel>
    </div>
    <div class="col-sm-8 col-md-8">
        <c1-pivot-grid id="indexGrid" items-source-id="ssasEngine"></c1-pivot-grid>
    </div>
</div>

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

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

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

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

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

}