JQXChart - how to get image binary (e.g. dataURL) of a chart

Multi tool use
I'm having a JQXChart on a page:
$('#chartContainer').jqxChart(settings);
What I'd like to do is the push this chart - as an image - to the server.
The component supports functionality like export to image:
https://www.jqwidgets.com/jquery-widgets-demo/demos/jqxchart/index.htm#demos/jqxchart/javascript_chart_export_jpeg.htm
But I can't see any possibility to just getting the image, without actually downloading it by a web browser. I have to pass this image to the back-end service.
I saw this kind of functionality in another JS framework:
http://www.jqchart.com/jquery/chart/ChartFeatures/ImageDataURL
Is it possible in jqwidgets? Or... somehow achievable through html5...
Thanks in advance
javascript html5-canvas jqxwidgets
add a comment |
I'm having a JQXChart on a page:
$('#chartContainer').jqxChart(settings);
What I'd like to do is the push this chart - as an image - to the server.
The component supports functionality like export to image:
https://www.jqwidgets.com/jquery-widgets-demo/demos/jqxchart/index.htm#demos/jqxchart/javascript_chart_export_jpeg.htm
But I can't see any possibility to just getting the image, without actually downloading it by a web browser. I have to pass this image to the back-end service.
I saw this kind of functionality in another JS framework:
http://www.jqchart.com/jquery/chart/ChartFeatures/ImageDataURL
Is it possible in jqwidgets? Or... somehow achievable through html5...
Thanks in advance
javascript html5-canvas jqxwidgets
add a comment |
I'm having a JQXChart on a page:
$('#chartContainer').jqxChart(settings);
What I'd like to do is the push this chart - as an image - to the server.
The component supports functionality like export to image:
https://www.jqwidgets.com/jquery-widgets-demo/demos/jqxchart/index.htm#demos/jqxchart/javascript_chart_export_jpeg.htm
But I can't see any possibility to just getting the image, without actually downloading it by a web browser. I have to pass this image to the back-end service.
I saw this kind of functionality in another JS framework:
http://www.jqchart.com/jquery/chart/ChartFeatures/ImageDataURL
Is it possible in jqwidgets? Or... somehow achievable through html5...
Thanks in advance
javascript html5-canvas jqxwidgets
I'm having a JQXChart on a page:
$('#chartContainer').jqxChart(settings);
What I'd like to do is the push this chart - as an image - to the server.
The component supports functionality like export to image:
https://www.jqwidgets.com/jquery-widgets-demo/demos/jqxchart/index.htm#demos/jqxchart/javascript_chart_export_jpeg.htm
But I can't see any possibility to just getting the image, without actually downloading it by a web browser. I have to pass this image to the back-end service.
I saw this kind of functionality in another JS framework:
http://www.jqchart.com/jquery/chart/ChartFeatures/ImageDataURL
Is it possible in jqwidgets? Or... somehow achievable through html5...
Thanks in advance
javascript html5-canvas jqxwidgets
javascript html5-canvas jqxwidgets
edited Jan 2 at 16:13


Matthijs
1,1951427
1,1951427
asked Jan 2 at 15:57
CzesiekCzesiek
11
11
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Looking at the documentation you linked it seems that the methods to export images support two arguments: fileName
and exportServer
. The documentation further states:
If you don't setup your own export server the default server is jqwidgets.com.
This causes the behavior of creating a download link as you described and can be seen on the example page. But there is no reason you shouldn't be able to use your own server. Since you want to push the image to your backend server anyway, just set up a corresponding route and use it in the method like:
$('#chartContainer').jqxChart('saveAsJPEG', 'myChart.jpeg', 'http://www.yourserver.com/export')
See what arrives on the server side and go from there.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54009360%2fjqxchart-how-to-get-image-binary-e-g-dataurl-of-a-chart%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Looking at the documentation you linked it seems that the methods to export images support two arguments: fileName
and exportServer
. The documentation further states:
If you don't setup your own export server the default server is jqwidgets.com.
This causes the behavior of creating a download link as you described and can be seen on the example page. But there is no reason you shouldn't be able to use your own server. Since you want to push the image to your backend server anyway, just set up a corresponding route and use it in the method like:
$('#chartContainer').jqxChart('saveAsJPEG', 'myChart.jpeg', 'http://www.yourserver.com/export')
See what arrives on the server side and go from there.
add a comment |
Looking at the documentation you linked it seems that the methods to export images support two arguments: fileName
and exportServer
. The documentation further states:
If you don't setup your own export server the default server is jqwidgets.com.
This causes the behavior of creating a download link as you described and can be seen on the example page. But there is no reason you shouldn't be able to use your own server. Since you want to push the image to your backend server anyway, just set up a corresponding route and use it in the method like:
$('#chartContainer').jqxChart('saveAsJPEG', 'myChart.jpeg', 'http://www.yourserver.com/export')
See what arrives on the server side and go from there.
add a comment |
Looking at the documentation you linked it seems that the methods to export images support two arguments: fileName
and exportServer
. The documentation further states:
If you don't setup your own export server the default server is jqwidgets.com.
This causes the behavior of creating a download link as you described and can be seen on the example page. But there is no reason you shouldn't be able to use your own server. Since you want to push the image to your backend server anyway, just set up a corresponding route and use it in the method like:
$('#chartContainer').jqxChart('saveAsJPEG', 'myChart.jpeg', 'http://www.yourserver.com/export')
See what arrives on the server side and go from there.
Looking at the documentation you linked it seems that the methods to export images support two arguments: fileName
and exportServer
. The documentation further states:
If you don't setup your own export server the default server is jqwidgets.com.
This causes the behavior of creating a download link as you described and can be seen on the example page. But there is no reason you shouldn't be able to use your own server. Since you want to push the image to your backend server anyway, just set up a corresponding route and use it in the method like:
$('#chartContainer').jqxChart('saveAsJPEG', 'myChart.jpeg', 'http://www.yourserver.com/export')
See what arrives on the server side and go from there.
answered Jan 6 at 14:41


luke-codewalkerluke-codewalker
17910
17910
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54009360%2fjqxchart-how-to-get-image-binary-e-g-dataurl-of-a-chart%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
BRo eU,qaJsv,PvRR NSSGC4OyUrur9j96IF lmm