dashboard-js-devexpress-dot-dashboard-640f88c3.md
A Web Dashboard extension that allows you to export dashboards and dashboard items.
export class DashboardExportExtension implements ISupportOptionExtension<DashboardExportExtensionOptions>
To configure the extension, refer to the DashboardExportExtensionOptions class that contains the Web Dashboard control’s export options.
See the following topic for information on how to use the DashboardControl’s client-side API: Extensions Overview.
The table below displays client-side API you can use to configure export options:
|
Export Type
|
DashboardExportExtension
|
DashboardExportExtensionOptions
| | --- | --- | --- | |
Common
|
DashboardExportExtension.allowExportDashboard
DashboardExportExtension.allowExportDashboardItems
DashboardExportExtension.showExportDashboardDialog
DashboardExportExtension.showExportDashboardItemDialog
|
DashboardExportExtensionOptions.allowExportDashboard
DashboardExportExtensionOptions.allowExportDashboardItems
DashboardExportExtensionOptions.onExportDialogHidden
DashboardExportExtensionOptions.onExportDialogShowing
DashboardExportExtensionOptions.onExportDialogShown
| |
Excel
|
DashboardExportExtension.getExcelExportOptions
DashboardExportExtension.setExcelExportOptions
DashboardExportExtension.exportToExcel
DashboardExportExtension.exportDashboardItemToExcel
|
DashboardExportExtensionOptions.excelExportOptions
| |
|
DashboardExportExtension.getPdfExportOptions
DashboardExportExtension.setPdfExportOptions
DashboardExportExtension.exportToPdf
DashboardExportExtension.exportDashboardItemToPdf
|
DashboardExportExtensionOptions.pdfExportOptions
| |
Image
|
DashboardExportExtension.getImageExportOptions
DashboardExportExtension.setImageExportOptions
DashboardExportExtension.exportToImage
DashboardExportExtension.exportDashboardItemToImage
|
DashboardExportExtensionOptions.imageExportOptions
|
ISupportOptionExtension
Initializes a new instance of the DashboardExportExtension class.
constructor(
dashboardControl: DevExpress.Dashboard.DashboardControl,
options?: DashboardExportExtensionOptions
)
| Name | Type | Description |
|---|---|---|
| dashboardControl | DashboardControl |
A Web Dashboard control that owns the extension.
| | options | DashboardExportExtensionOptions |
A DashboardExportExtensionOptions object that contains the extension options.
|
Specifies whether a user can export a dashboard.
get allowExportDashboard(): any
set allowExportDashboard(value: any)
| Type |
|---|
| any |
Use the allowExportDashboardItems property to allow or disallow the export of dashboard items.
Specifies whether a user can export dashboard items.
get allowExportDashboardItems(): any
set allowExportDashboardItems(value: any)
| Type |
|---|
| any |
Use the allowExportDashboard property to allow or disallow the export of the entire dashboard.
Specifies the unique extension name.
name: string
| Type | Description |
|---|---|
| string |
The unique extension name. The return value is dashboardExport.
|
Use the dashboardExport name in the following cases:
Warning
Do not change the unique name of the extension registered in the Web Dashboard to avoid exceptions.
Unsubscribes from the DashboardExportExtension’s events.
off: DevExpress.Dashboard.Internal.EventSubscriber<DashboardExportExtensionEvents>
| Type | Description |
|---|---|
| EventSubscriber<DashboardExportExtensionEvents> |
An event subscription.
|
Subscribes to DashboardExportExtension events.
on: DevExpress.Dashboard.Internal.EventSubscriber<DashboardExportExtensionEvents>
| Type | Description |
|---|---|
| EventSubscriber<DashboardExportExtensionEvents> |
An event subscription.
|
The extension’s on and off methods help you subscribe to and unsubscribe from events.
Exports a dashboard item to an Excel file.
exportDashboardItemToExcel(
itemName: string,
options?: DevExpress.Dashboard.DashboardExcelExportOptions,
fileName?: string
): void
| Name | Type | Description |
|---|---|---|
| itemName | string |
A string that is the component name of the dashboard item to be exported.
| | options | DashboardExcelExportOptions |
A DashboardExcelExportOptions object containing PDF-specific export options.
| | fileName | string |
A string that specifies the name of the exported file.
|
See Also
exportDashboardItemToPdf(itemName)
exportDashboardItemToImage(itemName)
Exports a dashboard item to an image.
exportDashboardItemToImage(
itemName: string,
options?: DevExpress.Dashboard.DashboardImageExportOptions,
fileName?: string
): void
| Name | Type | Description |
|---|---|---|
| itemName | string |
A string that is the component name of the dashboard item to be exported.
| | options | DashboardImageExportOptions |
A DashboardImageExportOptions object containing PDF-specific export options.
| | fileName | string |
A string that specifies the name of the exported file.
|
See Also
exportDashboardItemToExcel(itemName)
exportDashboardItemToPdf(itemName)
Exports a dashboard item to a PDF file.
exportDashboardItemToPdf(
itemName: string,
options?: DevExpress.Dashboard.DashboardPdfExportOptions,
fileName?: string
): void
| Name | Type | Description |
|---|---|---|
| itemName | string |
A string that is the component name of the dashboard item to be exported.
| | options | DashboardPdfExportOptions |
A DashboardPdfExportOptions object containing PDF-specific export options.
| | fileName | string |
A string that specifies the name of the exported file.
|
See Also
exportDashboardItemToExcel(itemName)
exportDashboardItemToImage(itemName)
Exports the entire dashboard to an Excel file.
exportToExcel(
options?: DevExpress.Dashboard.DashboardExcelExportOptions,
fileName?: string
): void
| Name | Type | Description |
|---|---|---|
| options | DashboardExcelExportOptions |
A DashboardExcelExportOptions object containing Excel-specific options.
| | fileName | string |
A string value that specifies the name of the exported file.
|
See Also
exportDashboardItemToExcel(itemName)
exportDashboardItemToPdf(itemName)
exportDashboardItemToImage(itemName)
Exports the entire dashboard to an image.
exportToImage(
options?: DevExpress.Dashboard.DashboardImageExportOptions,
fileName?: string
): void
| Name | Type | Description |
|---|---|---|
| options | DashboardImageExportOptions |
A DashboardImageExportOptions object containing image-specific export options.
| | fileName | string |
A string that specifies the name of the exported file.
|
See Also
exportDashboardItemToExcel(itemName)
exportDashboardItemToPdf(itemName)
exportDashboardItemToImage(itemName)
Exports the entire dashboard to a PDF file.
exportToPdf(
options?: DevExpress.Dashboard.DashboardPdfExportOptions,
fileName?: string
): void
| Name | Type | Description |
|---|---|---|
| options | DashboardPdfExportOptions |
A DashboardPdfExportOptions object containing PDF-specific export options.
| | fileName | string |
A string that specifies the name of the exported file.
|
See Also
exportDashboardItemToExcel(itemName)
exportDashboardItemToPdf(itemName)
exportDashboardItemToImage(itemName)
Returns options related to exporting a dashboard/dashboard item to Excel format.
getExcelExportOptions(): DevExpress.Dashboard.DashboardExcelExportOptions
| Type | Description |
|---|---|
| DashboardExcelExportOptions |
A DashboardExcelExportOptions object containing options related to exporting a dashboard item to Excel format.
|
Use the getExcelExportOptions method to get the current excel export options instance. Configure the instance and use the DashboardExportExtension.setExcelExportOptions(options) method to reassign options:
var exportExtension = <DashboardExportExtension>this.dashboardControl.findExtension("dashboardExport");
var excelExportOptions = exportExtension.getExcelExportOptions();
excelExportOptions.Format = "Xlsx";
excelExportOptions.DashboardStatePosition = "SeparateSheet";
exportExtension.setExcelExportOptions(excelExportOptions);
this.dashboardControl.render();
Use the DashboardExportExtensionOptions.excelExportOptions property to configure Excel export options when you initialize a dashboard control instance.
Returns options related to exporting a dashboard/dashboard item to the Image format.
getImageExportOptions(): DevExpress.Dashboard.DashboardImageExportOptions
| Type | Description |
|---|---|
| DashboardImageExportOptions |
A DashboardImageExportOptions object containing options related to exporting a dashboard item to the Image format.
|
Use the getImageExportOptions method to get the current image export options instance. Configure the instance and use the DashboardExportExtension.setImageExportOptions method to reassign options:
var exportExtension = <DashboardExportExtension>this.dashboardControl.findExtension("dashboardExport");
var imageExportOptions = exportExtension.getImageExportOptions();
imageExportOptions.Format = "Png";
imageExportOptions.FontInfo.UseCustomFontInfo = true;
imageExportOptions.FontInfo.Name = "Arial Black";
imageExportOptions.FontInfo.GdiCharSet = 1;
exportExtension.setImageExportOptions(imageExportOptions);
this.dashboardControl.render();
Use the DashboardExportExtensionOptions.imageExportOptions property to configure image export options when you initialize a dashboard control instance.
Returns options related to exporting a dashboard/dashboard item to PDF format.
getPdfExportOptions(): DevExpress.Dashboard.DashboardPdfExportOptions
| Type | Description |
|---|---|
| DashboardPdfExportOptions |
A DashboardPdfExportOptions object containing options related to exporting a dashboard item to PDF format.
|
Use the getPdfExportOptions method to get the current pdf export options instance. Configure the instance and use the DashboardExportExtension.setPdfExportOptions method to reassign options:
var exportExtension = <DashboardExportExtension>this.dashboardControl.findExtension("dashboardExport");
var pdfExportOptions = exportExtension.getPdfExportOptions();
pdfExportOptions.FontInfo.UseCustomFontInfo = true;
pdfExportOptions.FontInfo.Name = "Arial Black";
pdfExportOptions.FontInfo.GdiCharSet = 1;
exportExtension.setPdfExportOptions(pdfExportOptions);
this.dashboardControl.render();
Use the DashboardExportExtensionOptions.pdfExportOptions property to configure pdf export options when you initialize a dashboard control instance.
See Also
Hides the dialog that allows end-users to export the dashboard/dashboard item.
hideExportDialog(): void
To show the export dialog for the dashboard/dashboard item, use the showExportDashboardDialog(format) and showExportDashboardItemDialog(itemComponentName, format) methods, respectively.
Sets options related to exporting a dashboard/dashboard item to Excel format.
setExcelExportOptions(
options: DevExpress.Dashboard.DashboardExcelExportOptions
): void
| Name | Type | Description |
|---|---|---|
| options | DashboardExcelExportOptions |
A DashboardExcelExportOptions object containing options related to exporting a dashboard item to Excel format.
|
Use the DashboardExportExtension.getExcelExportOptions method to get the current Excel export options instance. Configure the instance and use the setExcelExportOptions method to reassign options:
var exportExtension = <DashboardExportExtension>this.dashboardControl.findExtension("dashboardExport");
var excelExportOptions = exportExtension.getExcelExportOptions();
excelExportOptions.Format = "Xlsx";
excelExportOptions.DashboardStatePosition = "SeparateSheet";
exportExtension.setExcelExportOptions(excelExportOptions);
this.dashboardControl.render();
Use the DashboardExportExtensionOptions.excelExportOptions property to configure Excel export options when you initialize a dashboard control instance.
Sets options related to exporting a dashboard/dashboard item to the Image format.
setImageExportOptions(
options: DevExpress.Dashboard.DashboardImageExportOptions
): void
| Name | Type | Description |
|---|---|---|
| options | DashboardImageExportOptions |
A DashboardImageExportOptions object containing options related to exporting a dashboard item to the Image format.
|
Use the DashboardExportExtension.getImageExportOptions method to get the current image export options instance. Configure the instance and use the setImageExportOptions method to reassign options:
var exportExtension = <DashboardExportExtension>this.dashboardControl.findExtension("dashboardExport");
var imageExportOptions = exportExtension.getImageExportOptions();
imageExportOptions.Format = "Png";
imageExportOptions.FontInfo.UseCustomFontInfo = true;
imageExportOptions.FontInfo.Name = "Arial Black";
imageExportOptions.FontInfo.GdiCharSet = 1;
exportExtension.setImageExportOptions(imageExportOptions);
this.dashboardControl.render();
Use the DashboardExportExtensionOptions.imageExportOptions property to configure image export options when you initialize a dashboard control instance.
Sets options related to exporting a dashboard/dashboard item to PDF format.
setPdfExportOptions(
options: DevExpress.Dashboard.DashboardPdfExportOptions
): void
| Name | Type | Description |
|---|---|---|
| options | DashboardPdfExportOptions |
A DashboardPdfExportOptions object containing options related to exporting a dashboard item to PDF format.
|
Use the DashboardExportExtension.getPdfExportOptions method to get the current pdf export options instance. Configure the instance and use the setPdfExportOptions method to reassign options:
var exportExtension = <DashboardExportExtension>this.dashboardControl.findExtension("dashboardExport");
var pdfExportOptions = exportExtension.getPdfExportOptions();
pdfExportOptions.FontInfo.UseCustomFontInfo = true;
pdfExportOptions.FontInfo.Name = "Arial Black";
pdfExportOptions.FontInfo.GdiCharSet = 1;
exportExtension.setPdfExportOptions(pdfExportOptions);
this.dashboardControl.render();
Use the DashboardExportExtensionOptions.pdfExportOptions property to configure pdf export options when you initialize a dashboard control instance.
Invokes the dialog that allows end-users to export the entire dashboard to the specified format.
showExportDashboardDialog(
format: DashboardExportFormat
): void
| Name | Type | Description |
|---|---|---|
| format | DashboardExportFormat |
A DashboardExportFormat value that specifies the export format.
|
Use the showExportDashboardItemDialog(itemComponentName, format) method to show the export dialog for the specified dashboard item. The hideExportDialog method allows you to hide the opened export dialog.
Invokes the dialog that allows end users to export the dashboard item to the specified format.
showExportDashboardItemDialog(
itemComponentName: string,
format: DashboardExportFormat
): void
| Name | Type | Description |
|---|---|---|
| itemComponentName | string |
A string value that specifies the component name of the dashboard item to export.
| | format | DashboardExportFormat |
A DashboardExportFormat value that specifies the export format.
|
Use the showExportDashboardDialog(format) method to show the export dialog for the entire dashboard. The hideExportDialog method allows you to hide the opened export dialog.
Warning
Note that some items (for example, Text Box or Image dashboard items) do not support exporting to the Excel format.
Contains code that is executed when you register the dashboard extension.
start(): void
Contains code that is executed when you unregister the dashboard extension.
stop(): void