Exporting/Printing Menu

This feature allows a user to print a chart displayed by the control or export it to one of the supported document formats. The control displays an "Exporting/Printing" button when exporting is enabled, which invokes a drop-down menu that lists exporting and printing commands. The following document formats are supported: PNG, PDF, JPEG, SVG and GIF.

Set the SettingsExport.Enabled property to true to display the Export button. The SettingsExport.PrintingEnabled property allows you to specify whether or not the Export menu should contain the Print item.

You can specify the name of the exported file using the SettingsExport.FileName property.

<dx:BootstrapPieChart runat="server" DataSourceID="ConfectionsSalesDataSource" Type="Doughnut" TitleSettings-Text="Confections Sales" InnerRadius="0.3">
    <SettingsExport Enabled="true" Formats="JPEG, PNG, SVG, GIF, PDF" FileName="confections_sales" />
    <SeriesCollection>
        <dx:BootstrapPieChartSeries ArgumentField="ProductName" ValueField="ProductSales">
            <Label Visible="true">
                <Format Type="Currency" />
            </Label>
        </dx:BootstrapPieChartSeries>
    </SeriesCollection>
</dx:BootstrapPieChart>

Export and Printing API

This demo illustrates the ExportTo and Print client API methods used to initiate exporting and printing from code using the Print and Export buttons above the Chart. Clicking the Print button invokes the browser's Print dialog and clicking the Export button saves the chart as a PNG file to your local storage.


<dx:BootstrapChart runat="server" ClientInstanceName="massChart" DataSourceUrl="~/jsondata/solarsystem.json" TitleSettings-Text="Relative Masses of the Heaviest Solar System Objects">
    <SeriesCollection>
        <dx:BootstrapChartScatterSeries ArgumentField="name" ValueField="mass" TagField="type">
            <Point Size="20" />
        </dx:BootstrapChartScatterSeries>
    </SeriesCollection>
    <ArgumentAxis Visible="true">
        <Label OverlappingBehavior="Rotate" RotationAngle="30" />
    </ArgumentAxis>
    <ValueAxisCollection>
        <dx:BootstrapChartValueAxis Type="Logarithmic" TitleSettings-Text="Mass Relative to the Earth" Visible="true" />
    </ValueAxisCollection>
</dx:BootstrapChart>
function onExportClick() {
    massChart.ExportTo("png", "mass_chart");
}
function onPritClick() {
     massChart.Print();
}
Screen Size
Color Themes
Demo QR Code