Calling a JavaScript function in data binding of chart

SebastianATL
edited February 11, 2022 in Analytics #1

Hello forum members,

in a report design that contains tables and pie charts I am trying to display values based on predefined different time frames e.g. YTD. Therefore I am using a Javascript function in a .js file that is in the resources of the report design.

The calculations work fine in the tables. However, when I call the function in the data binding of the chart the message "...is not defined" pops up. I was performing the same steps as I was for the tables. Is it not possible to access global functions in a chart?

I am using the commercial version of the OpenText Magellan Analytics Designer Release 16.7

Thanks in advance

Comments

  • jfranken
    edited May 11, 2020 #2
    I created a simple example.  The external js call worked (see attached).  The JavaScript function is called in the "Amount" binding.  Does this example work for you?  Can you share your report that is failing?
    Warning No formatter is installed for the format ipb
  • Hi Jeff,

    thanks for you quick reply which demonstrates the topic very well. I have opened your files in the Analytics Designer and after double-clicking on the chart I receive the same message "f1 is not defined". This happens even though the .js file is added to the resources section and in the right folder. A screenshot is attached,

  • Thank you for posting the screenshot.  I was able to replicate the issue.  Despite the message, the report runs without error and the external JavaScript function is correctly applied in my testing.  Is that the case for you as well?
    Warning No formatter is installed for the format ipb
  • Indeed, the report works with the function applied. I will see whether I can get my report to work by neglecting the error message and will let you know here in this post.

    Thanks

  • Are you able to open a support ticket?  This issue warrants filing a bug even if the resolution only involves fixing the error message.
    Warning No formatter is installed for the format ipb
  • Yes I am able to open a support ticket. Unfortunately I was not able to call a function in the report I am working with. The chart was not showing any data after the implementation. I am not able to upload the report and all files here because it contains sensitive customer data therefore I will open a support ticket.
    Thanks