-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
console.log(base64) not working in Annotation and Drawing Mode #35
Comments
Hi SD, It's not necessary to call the capture method again, If you already entered the annotation mode, just if you wish to replace it's context. Therefore you just need to call the "toJPG" method directly like following:
In addition following flag indicates if the chart is currently in annotation mode or not:
|
Hi, Your method worked. I changed chart["export"].toJPG to this.toJPG to make it work. However, I am unable to make use of the flag When I try console.log(chart.export.drawing.buffer.enabled); just to check the result when in Annotation Mode, I get the following error Please suggest since I would like to use the below logic if (chart.export.drawing.buffer.enabled == TRUE) { |
Please ensure your chart has been initiated / created and the export is ready to be able to check this flag. Following function does that, you just need to pass the instance you want to check:
|
Hi , |
Try this:
|
When I try the code in the below example it works fine
https://www.amcharts.com/tutorials/export-charts-advanced/
Now when I use the "Annotation" mode in the setExport property, the hand drawn shapes etc. do not get logged into the base64 data. I used the rendered event listener like below:
chart.addListener("rendered", function(e) {
// WAIT FOR FABRIC
var interval = setInterval(function() {
if (window.fabric) {
clearTimeout(interval);
}, 100);
});
How can I log the hand drawn shapes as I am trying to use the base64 and save it in a JPG in the server.
Thank you
SD
The text was updated successfully, but these errors were encountered: