Skip to content

Commit

Permalink
Charts ExportCustomMarkup: uncomment export in frameworks
Browse files Browse the repository at this point in the history
  • Loading branch information
Zedwag committed Sep 3, 2024
1 parent 536fcb8 commit b3b342b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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,
});
});
},
});
Expand Down
12 changes: 6 additions & 6 deletions apps/demos/Demos/Charts/ExportCustomMarkup/React/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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,
});
});
},
},
Expand Down
12 changes: 6 additions & 6 deletions apps/demos/Demos/Charts/ExportCustomMarkup/ReactJs/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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,
});
});
},
});
Expand Down
12 changes: 6 additions & 6 deletions apps/demos/Demos/Charts/ExportCustomMarkup/Vue/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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,
});
});
},
});
Expand Down

0 comments on commit b3b342b

Please sign in to comment.