Skip to content

igDataChart exportImage method throws error #2267

Open
@RivaIvanova

Description

@RivaIvanova

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions