Search results

Print And Export in Blazor Linear Gauge component

Print

The rendered linear gauge can be printed directly from the browser by calling the method Print. You can get the Linear Gauge component object using @ref="Gauge"

<button @onclick="PrintGauge">Print</button>
<SfLinearGauge @ref="Gauge">
</SfLinearGauge>

@code {
    SfLinearGauge Gauge;
    void PrintGauge()
    {
        gauge.Print();
    }
}

Linear Gauge Print Sample

Export

The rendered linear gauge can be exported to the following formats using the Export method. The input parameters for this method are export type for format and file name of result.

  • JPEG
  • PNG
  • SVG
  • PDF
<button @onclick="ExportGauge">Export</button>
<SfLinearGauge @ref="Gauge">
</SfLinearGauge>

@code {
    SfLinearGauge Gauge;
    void ExportGauge()
    {
        gauge.Export(ExportType.PNG, "LinearGauge");
    }
}

Linear Gauge Export Sample

Contents
Contents