Comments (18)
I seem to have the same (or a similar problem) with exporting AmCharts, here's a JSFiddle. Try exporting to PNG, and Fabric.js throws error βt[e].indexOf is not a functionβ in Chrome/Win. I created this example from the demo from AmCharts site.
Strangely, I tried another demo and it works, see the JSFiddle.
So far I haven't found what causes this difference.
PS @pepziman why do you include blob.js, fabric.js and filesaver.js twice?
from export.
OK, after gradually removing from failing fiddle everything not present in the working fiddle, I discovered that deleting zoomControl sectiion solves the problem (update: looks like zoomControl.gridHeight is causing it). This is not relevant for the original AmCharts issue, but helps with my AmMaps one.
from export.
@NPC thank you, ah about that twice script, i just misread the script and didn't saw that i already included it. so is it really the troublemaker? so if i deleted the zoomControl.gridHeight inside fabric.js the problem will solved? thank you for your help and response. will try it and got you updated.
from export.
@pepziman No no, don't touch fabric.js, it is a 3rd party library, so not a good idea to tamper with unless you're really confident. Better wait for AmCharts guys to respond.
The zoomControl.gridHeight is a property in AmMaps that was causing the issue for me, but since you don't use the maps then it is probably something different.
from export.
@NPC oh ok anton thank you.
btw now i got another type of error: it says
attributes[attr].indexOf is not a function fabric.js:2461
please anyone who are experts at amcharts, help me. thank you very much
from export.
hi @maertz , can you help me? thank you
from export.
Hi @pepziman, excuse me for the long waiting time. Unfortunately I was not able to reproduce your issue with your given chart setup but I'm glad you receive following error which will be fixed within next update:
attributes[attr].indexOf is not a function fabric.js:2461
Please hold on a while until I will release a new update, should be out in few hours.
Thanks @NPC for hanging in your hint saved me some time π
from export.
@maertz no problem, i glad u response my question so fast. for a little hint, my chart will look like this.
from export.
@pepziman I've just committed a new update, please replace it with yours and let me know if everything is fine.
Sincerely Ben
from export.
@maertz thank you very much Ben, will try it tomorrow at office, and get you updated with the result. π
Regards,
Albert
from export.
@maertz export's v1.4.30 fixes the export issue for me with AmMaps and the zoomControl.gridHeight, thank you very much!
PS I didn't dig deeper, but suspect that t[e].indexOf and attributes[attr].indexOf is the same error, seen with minified / original versions of Fabric.js.
from export.
You are welcome, indeed it's the same, the other is just the minified version of it :)
from export.
@maertz unlucky me, i still get t[e].indexOf error, i have changed the link with
<script src="//cdn.amcharts.com/lib/3/plugins/export/export.min.js"></script>
<link type="text/css" href="//cdn.amcharts.com/lib/3/plugins/export/export.css" rel="stylesheet">
i take a look at what code is causing this error and i found this:
fabric.warn = function() {}
,
"undefined" != typeof console && ["log", "warn"].forEach(function(t) {
"undefined" != typeof console[t] && "function" == typeof console[t].apply && (fabric[t] = function() {
return console[t].apply(console, arguments)
}
)
}),
yet still not working, but now when i clicked the download button, there is no response, not like before that the cursor became draw cursor. what should i do?
from export.
@pepziman did you verify if your browser downloaded the new version? Please ensure to flush your cache or simply force the browser to download it again.
<script src="//cdn.amcharts.com/lib/3/plugins/export/export.min.js?uniqueKey=123"></script>
My sample works fine. If you've some issue on mine let me know which browser and OS you are using. In case it's fine as well, I would like to ask you to give me a live sample of yours which reproduces the issue.
from export.
@maertz hi ben, sorry for late reply. turns out that the problem was my data syntax and some old deprecated attributes like fillAlpha and lineAlpha that made the chart unexportable. now the problem was solved and it works like charm!. thank you so much for your and @NPC help. π
Regards,
Albert
from export.
Glad to hear. Just a hint: ensure to use hexadecimal color codes and a 0-1 range for the alpha to avoid such unexpected behaviour.
Sincerely Ben
from export.
I had the exactly the same issue and changing the referred library to "//cdn.amcharts.com/lib/3/plugins/export/export.min.js?uniqueKey=123" did not help at all.
Luckily I played a little in jsfiddle and I discovered the issue was due to a "lineColor" element in a bullet graph.
You can test it here [https://jsfiddle.net/2nv06vfe/]
Just un-comment row 50 and you'll get the same error
from export.
Hi ildima,
please ensure you are using valid hex color codes:
078300 > #078300
https://jsfiddle.net/2nv06vfe/1/
from export.
Related Issues (20)
- amcharts-export-canvas class unexpected token HOT 4
- amCharts Export loading error on libraries HOT 5
- Legend items overlap HOT 4
- Failed to export Base64 representation of chart image HOT 1
- How to change language HOT 2
- amcharts annotation options keeps being selected
- amcharts annotation - Custom Path for shapes HOT 2
- amcharts : dynamic loading of themes HOT 3
- amcharts : annotation data object params
- amcharts : ability to export annotation as JSON objects HOT 2
- amcharts : callback isn't fired on chart.export.capture(options, callback) HOT 1
- Using my own buttons to invoke the export (outside of the chart) HOT 2
- Export using black theme causes hard to read text HOT 2
- Column opacity is lost when exporting as PNG HOT 2
- chart export blurs on zoom HOT 8
- export as image in Chrome cannot find canvg function HOT 1
- "exportTitles" does'nt export the value of the title
- Add export property to a created Amchart HOT 3
- Exception when trying to export a chart to PDF HOT 4
- Png graph sometimes gets downloaded cropped
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from export.