Chart.js icon indicating copy to clipboard operation
Chart.js copied to clipboard

Uncaught SyntaxError: Unexpected token ) in ChartJS.min

Open 0x73706f6f6b opened this issue 11 years ago • 4 comments

I've recently updated my project's ChartJS library with the latest minified version (1.0.2). Upon inspecting chart I received a console error: Uncaught SyntaxError: Unexpected token ) when hovering over a doughnut chart.

Upon further investigation in Chrome it yielded the following culprit

(function(obj
/**/) {
var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('');');if');(label){p.push('');');=labelp.push(':');');');}p.push('');');=');value');p.push('');}return p.join('');
})

This issue was resolved when switching to the unminified version of ChartJS and using YUI Compressor to minify.

This is similar to closed issue #1116 if that helps.

0x73706f6f6b avatar Jul 26 '15 01:07 0x73706f6f6b

Duplicate of #1280

etimberg avatar Dec 26 '15 00:12 etimberg

Sorry to say that compressor tool is increasing the file size and even though issue is not solved. image

Ali-Usmaan avatar Mar 08 '16 13:03 Ali-Usmaan

I got an alternative solution for my problem I just applied this css on my chart #doughnut{ pointer-events:none; } Problem solved

Ali-Usmaan avatar Mar 09 '16 08:03 Ali-Usmaan

VoteUP for http://stackoverflow.com/questions/35868379/uncaught-syntaxerror-unexpected-token-in-angular-charts-min-js-when-hovering if my answer helps

Ali-Usmaan avatar Apr 02 '16 06:04 Ali-Usmaan