Welcome Guest Search | Active Topics |

Graph export
NTT
#1 Posted : Tuesday, November 15, 2016 4:24:57 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 11/15/2016(UTC)
Posts: 8

Thanks: 1 times
Was thanked: 0 time(s) in 0 post(s)
I implemented a line graph with an exporting function, and realized that it does a call to www.jqchart.com to render the image/pdf.

Since I will be handling confidential data I need a way to export graphs without the use of other servers. Do you provide a way to render the graph/pdf in Javascript or on a self-hosted server?
Dragan
#2 Posted : Tuesday, November 15, 2016 7:52:55 AM(UTC)
Rank: Advanced Member

Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered
Joined: 1/3/2011(UTC)
Posts: 483

Thanks: 0 times
Was thanked: 87 time(s) in 87 post(s)
You can install our export application locally.

You can download our export app from:
www.jqchart.com/tests/Export.zip

You can unzip the folder and deploy it on IIS. After that you can use your server with:

Code:
var config = {
    server: 'http://www.yourserver.com/default.aspx',
    method: 'post',
    fileName: 'Chart.png',
    type: 'image/png' // 'image/png' or 'image/jpeg'
};

$('#jqChart').jqChart('exportToImage', config);
Best Regards,
Dragan Matek
jqChart Inc.
NTT
#3 Posted : Tuesday, November 15, 2016 4:59:36 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 11/15/2016(UTC)
Posts: 8

Thanks: 1 times
Was thanked: 0 time(s) in 0 post(s)
Thanks a lot for the quick response! This is a great solution, thanks for providing the code.

I need to include the right version of PdfFileWriter to run the project, it seems to be not the current version available on codeproject. It would be great if you could provide the dll of the right version.

Thanks a lot,
Martin
Dragan
#4 Posted : Thursday, November 17, 2016 7:06:02 AM(UTC)
Rank: Advanced Member

Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered
Joined: 1/3/2011(UTC)
Posts: 483

Thanks: 0 times
Was thanked: 87 time(s) in 87 post(s)
Hi,

You can change the PdfFileWriter version yourself if you want. You have the whole export site with all of the code.
Best Regards,
Dragan Matek
jqChart Inc.
NTT
#5 Posted : Thursday, November 17, 2016 7:24:42 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 11/15/2016(UTC)
Posts: 8

Thanks: 1 times
Was thanked: 0 time(s) in 0 post(s)
Hi,

sorry, I think there was a misunderstanding... PdfFileWriter is not included in the zip you provided. To run the export site, I need to know which version of PdfFileWriter it depends on to include it in the project.

Of course I could change the code of the export site to match the API of the current version of PdfFileWriter, but if you could provide the right dll this would save me a lot of work.

Thanks again,
Martin
Dragan
#6 Posted : Friday, November 18, 2016 3:00:07 AM(UTC)
Rank: Advanced Member

Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered
Joined: 1/3/2011(UTC)
Posts: 483

Thanks: 0 times
Was thanked: 87 time(s) in 87 post(s)
Hi,

PdfFileWriter.dll is in export/bin directory. You can open the whole folder as website from VS and it should work. You can also deploy is as it on an IIS server.
Best Regards,
Dragan Matek
jqChart Inc.
NTT
#7 Posted : Monday, November 21, 2016 5:06:35 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 11/15/2016(UTC)
Posts: 8

Thanks: 1 times
Was thanked: 0 time(s) in 0 post(s)
Ah, I am so sorry, I did not see it there... PdfFileWriter is referenced as another csproj in export.csproj, which is not included and thus cannot be found by VS initially, and then I did not look close enough to find the dll in the bin folder.

Now it works like a charm, thank you!
Users browsing this topic
Guest (3)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

FlatEarth Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.4 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.115 seconds.