Skip to content

Add texts to google chart legend breaks pdf conversion #77

@carduque

Description

@carduque

Hello,
On a google chart, if I have a javascript function to add absolute values to legend, PDF conversion returns error.
This is my function:

google.visualization.events.addListener(chart, 'ready', function () {
      var rowIndex = 0;
      Array.prototype.forEach.call(document.getElementById('AnswersNPS_div_').getElementsByTagName('text'), function(label) {
        // find legend labels
        if ((label.getAttribute('text-anchor') === 'start') && (label.getAttribute('fill') !== '#ffffff')  && (label.getAttribute('fill') !== '#000000')) {
          label.innerHTML += ' (' + data.getValue(rowIndex++, 1) + ')';
        }
      });
    });

Do you know why?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions