Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

igDataChart exportImage method throws error #2267

Open
RivaIvanova opened this issue Nov 6, 2024 · 0 comments
Open

igDataChart exportImage method throws error #2267

RivaIvanova opened this issue Nov 6, 2024 · 0 comments

Comments

@RivaIvanova
Copy link
Member

Description

When using the exportImage method:

var img = $('#chart').igDataChart("exportImage", $('#chart').width(), $('#chart').height());

an error is thrown:

infragistics.dv.js:980 Uncaught ReferenceError: _getImageHelper is not defined
    at Class._getImage (infragistics.dv.js:980:23837)
    at e.<computed>.<computed>.exportImage (infragistics.dv.js:1125:12357)
    at e.<computed>.<computed>.exportImage (all.js:14:7983)
    at HTMLDivElement.<anonymous> (all.js:14:8989)
    at Function.each (all.js:4:2975)
    at m.fn.init.each (all.js:4:835)
    at e.fn.<computed> [as igDataChart] (all.js:14:8872)
    at ExportImage (export-image:4286:35)
    at HTMLInputElement.onclick (export-image:4230:98)

It seems that the _getImageHelper function is defined in $.ig.TriangulationDataSource, but it is used in the _getImage function of the $.ig.dvCommonWidget where the error is thrown.

_getImage: function(width, height, chart) {
    var imgElement = document.createElement("img");
    imgElement.src = _getImageHelper(width, height, chart, "image/png");
    return imgElement;
},
  • ignite-ui version: 24.1
  • browser: any

Steps to reproduce

  1. Open the Data Chart - Export image sample.
  2. Click the Export as image button.
  3. Observe the DevTools Console.

Result

An error is thrown and the chart is not exported as an image.

Expected result

No errors and the chart should be exported as an image.

Attachments

Attach a sample if available, and screenshots, if applicable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant