124 строки
5.9 KiB
Plaintext
124 строки
5.9 KiB
Plaintext
<%@ Page Title="PivotGauge-Events-ASP.NET-SYNCFUSION" Language="C#" MetaDescription="This demo for Syncfusion Essential JS1 for ASP.NET pivot gauge control demonstrates the events that are triggered during the rendering operation." MasterPageFile="~/Samplebrowser.Master" AutoEventWireup="true" CodeBehind="Events.aspx.cs" Inherits="WebSampleBrowser.Events" %>
|
|
|
|
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="ControlsSection">
|
|
<script src='<%= Page.ResolveClientUrl("~/Scripts/excanvas.min.js")%>' type="text/javascript"></script>
|
|
<ej:PivotGauge ID="PivotGauge1" runat="server" IsResponsive="true" EnableTooltip="true" BackgroundColor="transparent" ClientIDMode="Static">
|
|
<DataSource Catalog="Adventure Works DW 2008 SE" Cube="Adventure Works" Data="//bi.syncfusion.com/olap/msmdpump.dll" >
|
|
<Rows>
|
|
<ej:Field FieldName="[Date].[Fiscal]">
|
|
</ej:Field>
|
|
</Rows>
|
|
<Columns>
|
|
<ej:Field FieldName="[Customer].[Customer Geography]"></ej:Field>
|
|
</Columns>
|
|
<Values>
|
|
<ej:Field Axis="Column">
|
|
<Measures>
|
|
<ej:MeasuresItems FieldName="[Measures].[Internet Sales Amount]" />
|
|
<ej:MeasuresItems FieldName ="[Measures].[Internet Revenue Status]" />
|
|
<ej:MeasuresItems FieldName ="[Measures].[Internet Revenue Trend]" />
|
|
<ej:MeasuresItems FieldName ="[Measures].[Internet Revenue Goal]" />
|
|
</Measures>
|
|
</ej:Field>
|
|
</Values>
|
|
</DataSource>
|
|
<ClientSideEvents DrawLabels="onLabelDraw" RenderSuccess="onClientSuccess" BeforeServiceInvoke="onBeforeServiceCall" AfterServiceInvoke="onAfterServiceCall" Load="onLoad"/>
|
|
<Scales>
|
|
<ej:CircularScales ShowRanges="true" Radius="150" ShowScaleBar="true" Size="1" ShowIndicators="true" ShowLabels="true">
|
|
<Border Width="0.5" />
|
|
<PointerCollection>
|
|
<ej:Pointers ShowBackNeedle="true" BackNeedleLength="20" Length="120" Width="7"></ej:Pointers>
|
|
<ej:Pointers Type="Marker" MarkerType="Diamond" DistanceFromScale="5" Placement="Center" BackgroundColor="#29A4D9" Length="25" Width="15"></ej:Pointers>
|
|
</PointerCollection>
|
|
<TickCollection>
|
|
<ej:CircularTicks Type="Major" DistanceFromScale="2" Height="16" Width="1" Color="#8c8c8c" />
|
|
<ej:CircularTicks Type="Minor" Height="6" Width="1" DistanceFromScale="2" Color="#8c8c8c" />
|
|
</TickCollection>
|
|
<LabelCollection>
|
|
<ej:CircularLabels Color="#8c8c8c"></ej:CircularLabels>
|
|
</LabelCollection>
|
|
<RangeCollection>
|
|
<ej:CircularRanges DistanceFromScale="-5" BackgroundColor="#fc0606" > <Border Color="#fc0606" /></ej:CircularRanges>
|
|
<ej:CircularRanges DistanceFromScale="-5"></ej:CircularRanges>
|
|
</RangeCollection>
|
|
<CustomLabelCollection>
|
|
<ej:CircularCustomLabel Color="#666666">
|
|
<Position X="180" Y="290" />
|
|
<Font Size="10px" FontFamily="Segoe UI" FontStyle="Normal"></Font>
|
|
</ej:CircularCustomLabel>
|
|
<ej:CircularCustomLabel Color="#666666">
|
|
<Position X="180" Y="320" />
|
|
<Font Size="10px" FontFamily="Segoe UI" FontStyle="Normal"></Font>
|
|
</ej:CircularCustomLabel>
|
|
<ej:CircularCustomLabel Color="#666666">
|
|
<Position X="180" Y="150" />
|
|
<Font Size="12px" FontFamily="Segoe UI" FontStyle="Normal"></Font>
|
|
</ej:CircularCustomLabel>
|
|
</CustomLabelCollection>
|
|
</ej:CircularScales>
|
|
</Scales>
|
|
<LabelFormatSettings DecimalPlaces="2" />
|
|
</ej:PivotGauge>
|
|
</asp:Content>
|
|
|
|
<asp:Content ID="Content4" runat="server" ContentPlaceHolderID="EventSection">
|
|
<div class="cols-prop-area event-tracer">
|
|
<div>
|
|
<div class="heading">
|
|
<span>Event Trace</span>
|
|
</div>
|
|
<div class="prop-grid content">
|
|
<div class="eventarea">
|
|
<div class="EventLog" id="EventLog"></div>
|
|
</div>
|
|
<div class="evtbtn">
|
|
<input type="button" class="eventclear e-btn" value="Clear" onclick="onClear()" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</asp:Content>
|
|
|
|
<asp:Content ID="ScriptContent" runat="server" ContentPlaceHolderID="ScriptSection">
|
|
<script type="text/javascript">
|
|
function onBeforeServiceCall() {
|
|
jQuery.addEventLog("Before service call event is invoked");
|
|
}
|
|
function onAfterServiceCall() {
|
|
jQuery.addEventLog("After service call event is invoked");
|
|
}
|
|
function onClientSuccess() {
|
|
loadPivotGaugeTheme();
|
|
jQuery.addEventLog("Gauge rendering succeeded");
|
|
}
|
|
function onLabelDraw(args) {
|
|
jQuery.addEventLog("Label drawn for " + this._id + " Label value: " + args.pointerValue);
|
|
}
|
|
function onClear() {
|
|
jQuery.clearEventLog();
|
|
}
|
|
function onLoad(args) {
|
|
args.model.dataSource.rows[0].filterItems = { values: ["[Date].[Fiscal].[Fiscal Year].&[2004]"] };
|
|
}
|
|
</script>
|
|
</asp:Content>
|
|
|
|
<asp:Content ID="Content3" runat="server" ContentPlaceHolderID="StyleSection">
|
|
<style type="text/css">
|
|
#PivotGauge1 {
|
|
height:300px;
|
|
width:100%;
|
|
float:left;
|
|
overflow:auto;
|
|
}
|
|
|
|
.row .cols-sample-area {
|
|
width: 72%;
|
|
}
|
|
.row .cols-prop-area {
|
|
width: 25%;
|
|
}
|
|
</style>
|
|
</asp:Content>
|
|
|