Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,47 +4,48 @@
[![](https://img.shields.io/badge/📖_How_to_use_DevExpress_Examples-e9f6fc?style=flat-square)](https://docs.devexpress.com/GeneralInformation/403183)
[![](https://img.shields.io/badge/💬_Leave_Feedback-feecdd?style=flat-square)](#does-this-example-address-your-development-requirementsobjectives)
<!-- default badges end -->
# DevExtreme Examples Template
# DevExtreme DataGrid and Chart - Export to PDF and Excel

This is the repository template for creating new examples.
This example exports a DataGrid and a related Chart together to PDF and Excel files.

![Example image](images/image-template.png)
![Example image](images/export-datagrid-chart.png)

Use **DevExtreme _Product_ - _Task_** template for a title.
The main approach is to export both UI components in a coordinated flow: the DataGrid is exported with DevExtreme exporters, and the Chart is converted to an image and inserted into the same output document.

Describe the solved task in this section.
For PDF export, the example uses [pdfExporter.exportDataGrid](https://js.devexpress.com/jQuery/Documentation/ApiReference/Common/Utils/pdfExporter/) to render the DataGrid with jsPDF and then draws the Chart image below the exported grid so both visuals are included in one file.

Put a screenshot/gif that illustrates the result here.

Then, add implementation details (steps, code snippets, and other technical information in a free form), or add a link to an existing document with implementation details.
For Excel export, the example uses [excelExporter.exportDataGrid](https://js.devexpress.com/jQuery/Documentation/ApiReference/Common/Utils/excelExporter/) with ExcelJS, inserts the Chart image into the worksheet, and places it at a configurable row/column offset so you can control layout relative to the grid.

## Files to Review

- **Angular**
- [app.component.html](Angular/src/app/app.component.html)
- [app.component.ts](Angular/src/app/app.component.ts)
- [grid-export.ts](Angular/src/app/grid-export.ts)
- **React**
- [App.tsx](React/src/App.tsx)
- [useExportDashboard.ts](React/src/hooks/useExportDashboard.ts)
- **Vue**
- [App.vue](Vue/src/App.vue)
- [Home.vue](Vue/src/components/HomeContent.vue)
- [HomeContent.vue](Vue/src/components/HomeContent.vue)
- [useExportDashboard.ts](Vue/src/composables/useExportDashboard.ts)
- **jQuery**
- [index.html](jQuery/src/index.html)
- [index.js](jQuery/src/index.js)
- [export-utils.js](jQuery/src/export-utils.js)
- **ASP.NET Core**
- [Index.cshtml](ASP.NET%20Core/Views/Home/Index.cshtml)

## Documentation

- link
- link
- ...
- [DataGrid - Export](https://js.devexpress.com/Documentation/ApiReference/UI_Components/dxDataGrid/Configuration/export/)
- [Chart - Export](https://js.devexpress.com/Documentation/ApiReference/UI_Components/dxChart/Configuration/export/)
- [pdfExporter - exportDataGrid](https://js.devexpress.com/Documentation/ApiReference/Common/Utils/pdfExporter/)
- [excelExporter - exportDataGrid](https://js.devexpress.com/Documentation/ApiReference/Common/Utils/excelExporter/)

## More Examples

- link
- link
- ...
- [DataGrid - ExcelJS Cell Customization Demo](https://js.devexpress.com/Demos/WidgetsGallery/Demo/DataGrid/ExcelJSCellCustomization/)
- [DataGrid - PDF Cell Customization Demo](https://js.devexpress.com/Demos/WidgetsGallery/Demo/DataGrid/PDFCellCustomization/)
<!-- feedback -->
## Does This Example Address Your Development Requirements/Objectives?

Expand Down
Binary file added images/export-datagrid-chart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/image-template.png
Binary file not shown.
Loading