Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Cannot import multiple r-script sources in RHTML visual

I'm unable to import multiple r-script source files in RHTML visuals.  Power BI and R seem to import the first file referenced, but any subsequent source(./r_files/foo.r) calls appear to be ignored. ...
  • v-evelk's avatar
    v-evelk
    6 years ago

    Hello,

     

    It is an issue in the template, we will fix it soon.

    To fix it for you now, please, change NodeListOf by HTMLCollectionOf type. It should help.

     

    Kind Regards,

     

    Evgenii Elkin,
    Software Engineer
    Microsoft Power BI Custom Visuals
    [email protected]

  • Anonymous's avatar
    Anonymous
    6 years ago

    Confirmed. Changing the following seems to fix the issue:

     

    ./src/visual.ts

    148let headList: NodeListOf = el.getElementsByTagName("head");>let headList: HTMLCollectionOf = el.getElementsByTagName("head");
    160let bodyList: NodeListOf = el.getElementsByTagName("body");>let bodyList: HTMLCollectionOf = el.getElementsByTagName("body");