srilak
Posts: 4
Joined: Mon Jan 17, 2022 9:41 am

Save Highchart charts in png/jpg format-c#

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?
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

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

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!
Mateusz Bernacik
Highcharts Developer
srilak
Posts: 4
Joined: Mon Jan 17, 2022 9:41 am

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

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.
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

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

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!
Mateusz Bernacik
Highcharts Developer
srilak
Posts: 4
Joined: Mon Jan 17, 2022 9:41 am

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

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?
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

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

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!
Mateusz Bernacik
Highcharts Developer
srilak
Posts: 4
Joined: Mon Jan 17, 2022 9:41 am

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

That would be great! Thanks a lot. Much appreciated.
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

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

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!
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Usage”