Unable to export pdf for javascript chart

Nikita Dureja shared this question 10 months ago
Completed

HI Team,

I am using the yellowfin 9.8 version, While trying to export pdf for a report which includes JavaScript chart, I am facing the error messages as attached in the image

I am able to successfully export reports in pdf that are without javascript charts. Please advise if it requires some additional settings from Infrastructure side

Thanks,

Nikita Dureja

Replies (35)

photo
1

Hi Nikita,

Thanks for reaching out to Yellowfin support.

We are currently reviewing this case. We will get back to you with the findings shortly.

Regards,

Hari Teja

photo
1

Hi Hari,

Nikita and I investigated this issue further. I was able to replicate the issue on a local Ski Team environment (Yellowfin 9.9.0 and Java Zulu11.52+13-CA).

Please see attached error log and a Ski Team javascript example chart you can use.

Hopefully this helps with your replication

Thanks,

Emma

photo
1

Hi Nikitha,

I hope you are doing well.

I have tried replicating this issue in our local environment YF version 9.9 and could able to export the JS chart in PDF file along with JS chart. Could you please go through the replication recording in the below link and also please try out with fresh report.

https://ftp.yellowfin.bi/f/38d43347556cbcf3

Regards,
Hari Teja

photo
1

Hi Hari,

I expected a more thorough response please.

For us to replicate your example, can you please sent us the js code you used to draw an svg, along with your java version?

You'll also see in my earlier comment, I sent you a Ski Team example with a real javascript chart, can you please test this example and let us know your result?

Thanks,

Emma

photo
1

Hi Emma,

Good day!

We are using Java Jre-1.8 and here’s is the JS code we used.

generateChart = function(options) {
var $chartDrawDiv = $(options.divSelector);
$chartDrawDiv.addClass('jsChartNoOverflow');
$chartDrawDiv.append(`
<svg>
<circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="red" />
</svg>`)
}

And we have replicated the Ski team example you provided in Yellowfin 9.9.0 and Java Zulu, but we got the same warning about not being able to export the Javascript chart in the output pdf.


Regards,
Hari Teja

photo
1

Dear Emma,


I hope you are doing well.

I just want to touch base to see if you had a chance to read through my response. If you can let me know that would be great.

Regards
Hari Teja

photo
1

Hi Hari,


I was able to replicate the code and it worked on sandbox- java.version:1.8.0_202 but I am unable to export pdf for this chart on Java Zulu11.52+13-CA. Our main focus is that we are unable to export the pdf on Java Zulu, so could you please look into that issue


Regards,

Nikita Dureja

photo
1

Hello Nikita,

This is to keep you informed that, I have submitted a Jira ticket on your behalf to the Product Team for further review or clarification. As soon as I hear back from them, I will update this case for your visibility. Please let me know if there is anything else I can help you with, I would be happy to do so.

Regards,
Hari Teja

photo
1

Hi Hari,

For clarity, with your example chart (the circle svg), we can export that to PDF successfully on both java 8 and java 11.

But the example chart that I sent you in an earlier comment, will not export to PDF on either java 8 or 11. I believe you also tested this on java 8 and could not get it export the chart to the PDF. So we are wanting clarification about how to get a chart like that to export to PDF? This chart experiences the same exporting issue as our own custom js chart.

Many thanks,

Emma

photo
1

Hi Hari,


Is there any update on the ticket that you have raised and can you please provide the ticket number so that I can also track it


Thanks and Regards,

Nikita Dureja

photo
1

Hi Nikita,

Hope you are doing good.


I am just waiting for updates from the developer team. I will let you know as soon as I receive an update.


Regards,
Hari Teja

photo
1

Hi Nikita,

Greeting of the day!

As per the update received from the development team, After conducting various tests, it appears that the main cause of the problem is a lack of JavaFX in your environment. JavaFX is specifically required for this type of chart. It works successfully when tested with Zulu 11.60.19 with JavaFX. When I tried it with Zulu 11.60.19 without JavaFX, I received the following error: "Javascript charts will not be exported."
So, if you start using Java FX, there is a good chance that the problem will be fixed.

If you have any questions about how to add JavaFX or need guidance on the specific steps to follow, please go through below KB article links.

https://community.yellowfinbi.com/knowledge-base/article/javafx

https://community.yellowfinbi.com/topic/how-do-i-add-javafx-to-my-system#:~:text=Download%20the%20relevant%20JavaFX%20SDK,your%20system%20for%20safe%20keeping.



Regards,
Hari Teja

photo
1

Hello Nikita,

I hope you are doing well.


I just want to touch base to see if you had a chance to read through my response. If you can let me know that would be great.


Regards,
Hari Teja

photo
1

Hi Hari,

As suggested, I upgraded the java version to Zulu 11.60.19 with JavaFX in my local environment first but I am still facing the error while trying to export the chart to pdf. Error message has been attached for your reference

Thanks and Regards,

Nikita Dureja

photo
1

Hi Hari,


Infrastructure team uses yellowfin container that is built by yellowfin and they just deploy it. So could you please provide the container which has Zulu 11.60.19 with JavaFX installed

Thanks and Regards,

Nikita Dureja

photo
1

Hi Nikita,

Hope you are doing good.


I just want to check after upgrading the java version to Zulu 11.60.19 have you updated the path in Catalina file?


Regards,
Hari Teja

photo
1

Hi Hari,

Yes in the local environment, I did update Catalina file with the updated path. Please find attached the local host info page for reference. Also for the actual environment Infrastructure team uses yellowfin container, so it would be really great if you could provide the container which has Zulu 11.60.19 with JavaFX installed

Thanks and Regards,

Nikita Dureja

photo
1

Hello Nikita,

Greeting of the day!


I wanted to address your recent inquiry regarding container support for Yellowfin. At this time, we regret to inform you that we are unable to provide containers from a support standpoint. However, we do offer a Docker image (all-in-one, app only ) of Yellowfin, which can be used to deploy and run our software within a containerized environment.

Could you please go through below KB article link for more details


https://wiki.yellowfinbi.com/display/yfcurrent/Install+in+a+Container


Regards,
Hari Teja

photo
1

Hi Hari,

Thanks for sharing the link..but I first wanted to resolve the issue in local instance but I am still unable to export pdf for the chart with Zulu 11.60.19 with JavaFX installed

Thanks and Regards,

Nikita Dureja

photo
1

Hello Nikita,

To ensure we fully understand the situation and can provide you with the best possible support, we would like to schedule a remote session. Kindly let us know your availability so that we can roll out a meeting invite. I am available from Monday to Friday, 2:00 PM IST to 11:00 PM IST.


Regards,
Hari Teja

photo
1

Hi Hari,

Can we have a meeting at 4pm IST on Wednesday?

Thanks and Regards,

Nikita Dureja

photo
1

Hi Nikita,

Thanks for the response. A meeting invitation has been sent to your registered mail ID for Wednesday, Oct 11 at 4:00 PM IST


Regards,
Hari Teja

photo
1

Hi Hari,

Wanted to check if there has been any update since we last met on this issue

Thanks and Regards,

Nikita Dureja

photo
1

Hello Nikita,

Thank you for the response. Currently Hari Teja is not available. I will check this with my wider team and get back to you soon.

Regards

Siddhartha

photo
1

Hi Siddartha,

I wanted to check if you got any response form the team since we have been waiting for a long time for this issue to be resolved


Thanks and Regards,

Nikita Dureja

photo
1

Hello Nikita,

Apologies for the delay. As per the update from the development team - Due to focus on upcoming integration with Fusion Charts this task has been marked by development as "won't do."

our PDF export doesn't support Google Charts because Google's CDN is incompatible with how we embed styles for PDF export.

 Loading a JavaScript chart onto a page typically requires a chart library to be loaded, as well as its accompanying stylesheets. To embed stylesheets, they will be downloaded using XHR requests, so their server must set appropriate CORS response headers. In particular, Google Sheets cannot be rendered to PDF.

 Additionally, this causes an asynchronous load which could lead to a chart rendering after the rest of the report, depending on the code written around it.
Could you please go through the below wiki article it contains the information related to this issue.

( https://wiki.yellowfinbi.com/display/yfcurrent/JavaScript+Charts#JavaScriptCharts-RenderingtoPDF)

Please let us know if anything else comes up that we can help you with.


Regards

Siddhartha

photo
1

Hi Siddartha,

Thanks for the update. Since I have to build organizational hierarchy chart for which I was using google charts. Could you suggest an alternative where the chart can also be exported to pdf

Thanks and Regards,

Nikita Dureja

photo
1

Hello Nikita

Thank you for the response. Unfortunately at this point of time we don't have any alternative method. Apologies for the inconvenience. if this feature comes in the upcoming yellowfin releases I will let you know on that.


Regards

Siddhartha

photo
1

Hello Nikita

I just want to touch base to see if you had chance to read through below response. If you can let us know that would be great.

Regards

Siddhartha

photo
1

Hi Siddartha,

So you are saying even if we use libraries other than google charts to build organizational chart, we wont be able to export that to pdf

Thanks and Regards,

Nikita Dureja

photo
1

Hello Nikita

Apologies for delay in response. Yes we can use libraries other than google charts to build organizational chart. we've got some JavaScript chart libraries like Chart.js, D3.js, etc., locally available, but unfortunately, we don't have the Google Chart library.

Please let us know if anything else comes up that we can help you with.

Regards

Siddhartha

photo
1

Hi Siddartha,

Thanks for your response. So if I use JavaScript chart libraries like Chart.js, D3.js to build organizational chart, will I be able to export that chart to pdf ?

Thanks and Regards,

Nikita Dureja

photo
1

Hello Nikita

Thanks for your response. Yes, if you can create organisational charts using JavaScript chart libraries like Chart.js and D3.js, you will be able to export such chart to PDF.


Regards

Siddhartha

photo
1

Hi Siddartha,

Thanks...I will try creating organizational chart with these libraries. Tanks for your reply

Regards,

Nikita Dureja

photo
1

Hello Nikita

Thank you for the replay. for the time being, I will be marking this ticket as closed. However, if you ever wanted to revisit this or have anything else I can help you with, please let us know, we will be more than happy to do so.

Have a great rest of your day!

Regards

Siddhartha

Leave a Comment
 
Attach a file