highcharts / highcharts-ios

iOS wrapper for Highcharts.
Other
127 stars 39 forks source link

How to export chart to PDF programmatically without clicking the chart menu button #352

Closed ArunVicky001 closed 3 years ago

ArunVicky001 commented 3 years ago

Hi Team,

I have a requirement to export the chart to PDF programmatically and share without hitting the button, is it possible in this library?

ihnatmoisieiev commented 3 years ago

Hello @ArunVicky001,

it's possible. Just call exportToPDF method from your HIChartView.

ArunVicky001 commented 3 years ago

Thanks for your response, I see it's a void method I am sure how to read this value and assign and share. could you please elaborate your answer?

ihnatmoisieiev commented 3 years ago

@ArunVicky001 just call this method when you need:

chartView.exportToPDF()

It opens a bottom sheet to share chart in PDF format:

Screenshot 2020-12-16 at 19 37 58
ihnatmoisieiev commented 3 years ago

@ArunVicky001 can I close the issue?

ArunVicky001 commented 3 years ago

@ihnatmoisieiev Thanks for your response! I have one more question related to this topic, Is it possible to set the chartView.exportToPNG() image to UIImageView?

ihnatmoisieiev commented 3 years ago

@ArunVicky001 it's not possible, because the exportToPNG() method will open a bottom sheet to share chart in PNG format.

ArunVicky001 commented 3 years ago

@ihnatmoisieiev is there is any possibility to share the PDF or PNG image other than these two methods?

ihnatmoisieiev commented 3 years ago

@ArunVicky001 there are no other possibilities.

ArunVicky001 commented 3 years ago

@ihnatmoisieiev okay thank you, but in a later version please integrate this feature.

ihnatmoisieiev commented 3 years ago

@ArunVicky001 which feature do you mean? Please describe in details.

ihnatmoisieiev commented 3 years ago

Closing due to inactivity.