Page 1 of 1

Save Highchart charts in png/jpg format-c#

Posted: Mon Jan 17, 2022 9:54 am
by srilak
Is there a way to generate chart in Highcharts in c# (dotnet core)? If yes, how?
Also, How to save the generated charts in png/jpg format in windows machine with c# dotnet core?

Re: Save Highchart charts in png/jpg format-c#

Posted: Mon Jan 17, 2022 3:56 pm
by mateusz.b
Hi srilak,

Welcome to our forum and thanks for contacting us with your question!

Could you please describe more precisely your use case? Would you like to know how to build a chart in .net and how to use export module or someting more complicated?

Thanks in advance for clarification.
Regards!

Re: Save Highchart charts in png/jpg format-c#

Posted: Mon Jan 17, 2022 5:11 pm
by srilak
Hi,
Yes I am exactly in need of what you had mentioned, To create a chart in .net (core) and export the same and save it as a png file in my local drive.

Re: Save Highchart charts in png/jpg format-c#

Posted: Tue Jan 18, 2022 12:13 pm
by mateusz.b
Hi srilak,

Here you can find examples with .net Highcharts:
https://dotnet.highcharts.com/

To export and save chart as png locally, you will need an exporting module. Here is a demo with exporting module. Click on icon in right top corner and select Download PNG image:
https://dotnet.highcharts.com/Highchart ... me=default

Let me know if that was what you were looking for!
Regards!

Re: Save Highchart charts in png/jpg format-c#

Posted: Tue Jan 18, 2022 4:37 pm
by srilak
This is fine. But we dont have a UI to display the charts actually. we would want to save it somewhere or write it to a pdf using .net core. is that possible?

Re: Save Highchart charts in png/jpg format-c#

Posted: Thu Jan 20, 2022 5:23 pm
by mateusz.b
Hi srilak,

Sorry for slightly longer response time. It should be possible and if you dont want to display the chart, then export server should be perfect. I asked our export server expert for some examples of how to do that and I will get back to you with an answer asap.

Regards!

Re: Save Highchart charts in png/jpg format-c#

Posted: Fri Jan 21, 2022 2:27 pm
by srilak
That would be great! Thanks a lot. Much appreciated.

Re: Save Highchart charts in png/jpg format-c#

Posted: Mon Jan 24, 2022 11:30 am
by mateusz.b
Hi srilak,

Thanks for your patience.

Unfortunately, it is not possible to use export server directly in .net core. What you need to do is set node export server and send requests from dotnet.
Here you can find a documentation and an instruction on how to set your local export server:
https://www.highcharts.com/docs/export- ... the-server

Let me know if you have any further questions!
Regards!