29 Aug 20172 minutes to read

Linear Gauge has an exporting feature that converts Gauge control into image format and then export in client side. The method API exportImage is used to export the LinearGauge. It has two arguments such as file name and file format to specify the file name and file formats. For exporting refer the following code example.

<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="buttonclickevent()" />

<ej:LinearGauge runat="server" ID="CoreExportGauge" Load="loadGaugeTheme" LabelColor="#8c8c8c">

<%-- For setting scales-- %>


<ej:Scales Width="4" ShowBarPointers="false" ShowRanges="true" Length="310">

<Border Color="transparent" Width="0"></Border>

<Position X="52" Y="50"/>

<%-- For setting Marker Pointers -- %>


<ej:MarkerPointers Width="10" Length="10" Value="60" MarkerBackgroundColor="#4d4d4d">

<Border Color="#4d4d4d"></Border>



<%-- For setting labels-- %>


<ej:Labels><DistanceFromScale X="-13"></DistanceFromScale>

<Font FontFamily="Segoe UI" FontStyle="Bold" Size="11px"></Font>



<%-- For setting Ticks-- %>


<ej:LinearTicks Type="MajorInterval" Width="1" Color="#8c8c8c"/>


<%-- For setting range-- %>


<ej:Ranges StartValue="0" EndValue="50" RangeBackgroundColor="#F6B53F" EndWidth="4" StartWidth="4"><Border Color="#F6B53F"></Border></ej:Ranges>

<ej:Ranges StartValue="50" EndValue="100" RangeBackgroundColor="#E94649" EndWidth="4" StartWidth="4"><Border Color="#E94649"></Border></ej:Ranges>




<script type="text/javascript" class="jsScript">

$(function () {


$("#Button1").ejButton({ width: "100px", click: "buttonClickEvent" });


function buttonClickEvent() {

var FileName = $("#fileName").val();

var FileFormat = $("#ddImageFormat").ejDropDownList("option", "value");

$("#CoreExportGauge").ejLinearGauge("exportImage", FileName, FileFormat);



Execute the above code to render the following output.