Giter Club home page Giter Club logo

Comments (18)

NPC avatar NPC commented on July 28, 2024

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.

NPC avatar NPC commented on July 28, 2024

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.

pepziman avatar pepziman commented on July 28, 2024

@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.

NPC avatar NPC commented on July 28, 2024

@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.

pepziman avatar pepziman commented on July 28, 2024

@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.

pepziman avatar pepziman commented on July 28, 2024

hi @maertz , can you help me? thank you

from export.

maertz avatar maertz commented on July 28, 2024

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.

pepziman avatar pepziman commented on July 28, 2024

@maertz no problem, i glad u response my question so fast. for a little hint, my chart will look like this.
untitled

from export.

maertz avatar maertz commented on July 28, 2024

@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.

pepziman avatar pepziman commented on July 28, 2024

@maertz thank you very much Ben, will try it tomorrow at office, and get you updated with the result. πŸ‘

Regards,
Albert

from export.

NPC avatar NPC commented on July 28, 2024

@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.

maertz avatar maertz commented on July 28, 2024

You are welcome, indeed it's the same, the other is just the minified version of it :)

from export.

pepziman avatar pepziman commented on July 28, 2024

@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.

maertz avatar maertz commented on July 28, 2024

@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.

pepziman avatar pepziman commented on July 28, 2024

@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.

maertz avatar maertz commented on July 28, 2024

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.

ildima avatar ildima commented on July 28, 2024

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.

maertz avatar maertz commented on July 28, 2024

Hi ildima,

please ensure you are using valid hex color codes:

078300 > #078300

https://jsfiddle.net/2nv06vfe/1/

from export.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.