Exporting in EJ 1 ASP.NET MVC CircularGauge

17 Nov 2017 / 1 minute to read

  • Circular 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 Circular Gauge.
  • 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.
  • js
  • @(Html.EJ().CircularGauge("circulargauge"))
    
    <input type="submit" value="Export Image" id="btnExportImage" />
    
    
    
    <script type="text/javascript">
    
            $(function () {
    
                $("#btnExportImage").ejButton({ width: "100px", click: "buttonClickEvent", });
    
            });
    
            function buttonClickEvent() {
    
                var FileName = $("#txtFileName").val();
    
                var FileFormat = $("#ddlFileType").val();
    
                $("#circulargauge").ejCircularGauge("exportImage", FileName, FileFormat);
    
            }
    
    
    
        </script>

    Execute the above code to render the following output.

    Exporting_img1

    Circular Gauge control Export Functionality