diff --git a/apps/demos/Demos/Charts/ExportCustomMarkup/Angular/app/app.component.ts b/apps/demos/Demos/Charts/ExportCustomMarkup/Angular/app/app.component.ts index a30b6fc229c9..9812797f45d4 100644 --- a/apps/demos/Demos/Charts/ExportCustomMarkup/Angular/app/app.component.ts +++ b/apps/demos/Demos/Charts/ExportCustomMarkup/Angular/app/app.component.ts @@ -6,7 +6,7 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { DxChartModule, DxChartComponent, DxButtonModule } from 'devextreme-angular'; import { exportFromMarkup } from 'devextreme/viz/export'; -// import canvg from 'canvg'; +import canvg from 'canvg'; import { Service, OilProductionDataItem } from './app.service'; if (!/localhost/.test(document.location.host)) { @@ -42,11 +42,11 @@ export class AppComponent { format: 'png', svgToCanvas(svg, canvas) { return new Promise((resolve) => { - // canvg(canvas, new XMLSerializer().serializeToString(svg), { - // ignoreDimensions: true, - // ignoreClear: true, - // renderCallback: resolve, - // }); + canvg(canvas, new XMLSerializer().serializeToString(svg), { + ignoreDimensions: true, + ignoreClear: true, + renderCallback: resolve, + }); }); }, }); diff --git a/apps/demos/Demos/Charts/ExportCustomMarkup/React/App.tsx b/apps/demos/Demos/Charts/ExportCustomMarkup/React/App.tsx index 30d514d692b1..9956a40b04ad 100644 --- a/apps/demos/Demos/Charts/ExportCustomMarkup/React/App.tsx +++ b/apps/demos/Demos/Charts/ExportCustomMarkup/React/App.tsx @@ -4,7 +4,7 @@ import { } from 'devextreme-react/chart'; import { Button } from 'devextreme-react/button'; import { exportFromMarkup } from 'devextreme/viz/export'; -// import toCanvas from 'canvg'; +import toCanvas from 'canvg'; import { dataSource } from './data.ts'; import Form from './Form.tsx'; @@ -43,11 +43,11 @@ function App() { svgToCanvas(svg: Node, canvas) { // eslint-disable-next-line no-unused-vars return new Promise((resolve) => { - // toCanvas(canvas, new XMLSerializer().serializeToString(svg), { - // ignoreDimensions: true, - // ignoreClear: true, - // renderCallback: resolve, - // }); + toCanvas(canvas, new XMLSerializer().serializeToString(svg), { + ignoreDimensions: true, + ignoreClear: true, + renderCallback: resolve, + }); }); }, }, diff --git a/apps/demos/Demos/Charts/ExportCustomMarkup/ReactJs/App.js b/apps/demos/Demos/Charts/ExportCustomMarkup/ReactJs/App.js index 05c0bb368254..1b109bb3452d 100644 --- a/apps/demos/Demos/Charts/ExportCustomMarkup/ReactJs/App.js +++ b/apps/demos/Demos/Charts/ExportCustomMarkup/ReactJs/App.js @@ -9,7 +9,7 @@ import { } from 'devextreme-react/chart'; import { Button } from 'devextreme-react/button'; import { exportFromMarkup } from 'devextreme/viz/export'; -// import toCanvas from 'canvg'; +import toCanvas from 'canvg'; import { dataSource } from './data.js'; import Form from './Form.js'; @@ -41,11 +41,11 @@ function App() { svgToCanvas(svg, canvas) { // eslint-disable-next-line no-unused-vars return new Promise((resolve) => { - // toCanvas(canvas, new XMLSerializer().serializeToString(svg), { - // ignoreDimensions: true, - // ignoreClear: true, - // renderCallback: resolve, - // }); + toCanvas(canvas, new XMLSerializer().serializeToString(svg), { + ignoreDimensions: true, + ignoreClear: true, + renderCallback: resolve, + }); }); }, }); diff --git a/apps/demos/Demos/Charts/ExportCustomMarkup/Vue/App.vue b/apps/demos/Demos/Charts/ExportCustomMarkup/Vue/App.vue index 9ff48cbd8a26..bc14159a7dc7 100644 --- a/apps/demos/Demos/Charts/ExportCustomMarkup/Vue/App.vue +++ b/apps/demos/Demos/Charts/ExportCustomMarkup/Vue/App.vue @@ -69,7 +69,7 @@ import { } from 'devextreme-vue/chart'; import { exportFromMarkup } from 'devextreme/viz/export'; import DxButton from 'devextreme-vue/button'; -// import toCanvas from 'canvg'; +import toCanvas from 'canvg'; import { dataSource } from './data.ts'; import Form from './Form.vue'; @@ -106,11 +106,11 @@ function onClick() { svgToCanvas(svg, canvas) { // eslint-disable-next-line no-unused-vars return new Promise((resolve) => { - // toCanvas(canvas, new XMLSerializer().serializeToString(svg), { - // ignoreDimensions: true, - // ignoreClear: true, - // renderCallback: resolve, - // }); + toCanvas(canvas, new XMLSerializer().serializeToString(svg), { + ignoreDimensions: true, + ignoreClear: true, + renderCallback: resolve, + }); }); }, });