Skip to content
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

Uncaught TypeError: Cannot read property 'getItem' of undefined #1566

Closed
scottydelta opened this issue Jan 30, 2016 · 19 comments
Closed

Uncaught TypeError: Cannot read property 'getItem' of undefined #1566

scottydelta opened this issue Jan 30, 2016 · 19 comments

Comments

@scottydelta
Copy link

@scottydelta scottydelta commented Jan 30, 2016

gettting this error on Chromium: 48.0.2564.97 on bar charts when hovered over bars or when clicked on bars. Works perfectly fine on safari. It was working perfectly on Chromium 46.~

Here is the screenshot of the console.

screen shot 2016-01-29 at 6 33 21 pm

@pras2015
Copy link

@pras2015 pras2015 commented Jan 31, 2016

Having the same issue in Chrome Version 48.0.2564.97

Works as expected in Firefox 44.0 and IE 11

Loading

@vipul-jain
Copy link

@vipul-jain vipul-jain commented Feb 1, 2016

Uncaught TypeError: Cannot read property 'getItem' of undefined.
Works before chrome update.

c3_chart_internal_fn.isWithinBar = function (that) {
var mouse = this.d3.mouse(that), box = that.getBoundingClientRect(),
seg0 = that.pathSegList.getItem(0), seg1 = that.pathSegList.getItem(1),
x = Math.min(seg0.x, seg1.x), y = Math.min(seg0.y, seg1.y),
w = box.width, h = box.height, offset = 2,
sx = x - offset, ex = x + w + offset, sy = y + h + offset, ey = y - offset;
return sx < mouse[0] && mouse[0] < ex && ey < mouse[1] && mouse[1] < sy;
};

Loading

@Roywcm
Copy link

@Roywcm Roywcm commented Feb 2, 2016

Same error here.
Chrome version: 48.0.2564.97

Loading

@Roywcm
Copy link

@Roywcm Roywcm commented Feb 2, 2016

Loading

@sole6
Copy link

@sole6 sole6 commented Feb 3, 2016

same here with chrome- Version 48.0.2564.97 m
works fine on firefox though

Loading

@Roywcm
Copy link

@Roywcm Roywcm commented Feb 3, 2016

Loading

@kjantzer
Copy link

@kjantzer kjantzer commented Feb 4, 2016

Thanks @Roywcm , that did the trick.

Loading

@paulbrab
Copy link

@paulbrab paulbrab commented Feb 4, 2016

@Roywcm worked for me too. Would be nice to get the library updated with the fix though.

Loading

@bt
Copy link

@bt bt commented Feb 11, 2016

+1, please merge #1564 into master.

Loading

@aendrew
Copy link
Member

@aendrew aendrew commented Feb 18, 2016

Hi all, apologies for the delay in getting to this (rather critical) issue. I've merged #1564 into the new dev branch, which is where I'll by merging in the current tranch of PRs for the foreseeable future. Once Masayuki is able to review the dev branch, it'll be merged into master.

To use the dev branch in your projects, do the following:

  • Bower:
    bower install c3#dev --save
  • NPM:
    npm install c3#dev --save

Please let me know if you have any issues. Thanks!

Loading

@Paulsky
Copy link

@Paulsky Paulsky commented Feb 22, 2016

Hi Aendrew,

I installed the dev branch through Bower. But I'm still getting the error 'Cannot read property 'getItem' of undefined'. Can anyone confirm that the dev branch is working in Chrome 48?

Loading

@brayann
Copy link

@brayann brayann commented Mar 1, 2016

Works for me, thanks. Question though: can the dev branch be trusted to use in production? If not, any plans of merging this into a new release? @aendrew

Loading

@aendrew
Copy link
Member

@aendrew aendrew commented Mar 3, 2016

@brayann The dev branch is currently the master branch with a few tested PRs merged in. It's intended to help push forward to 0.4.12 while @masayuki0812 puts the finishing touches on 0.4.11. As such, it's probably not the most stable thing.

From what I understand, @masayuki0812 is planning a new release fairly soon. I don't see any reason why this wouldn't be in it.

Loading

@aendrew
Copy link
Member

@aendrew aendrew commented Mar 3, 2016

I'm actually going to reopen this issue until the fix is in master so as to increase visibility. It'd be really bad if 0.4.11 went out without this.

Loading

@aendrew aendrew reopened this Mar 3, 2016
@xtreemrage
Copy link

@xtreemrage xtreemrage commented Mar 9, 2016

@Paulsky
This works for me with bower (bower -v = 1.7.7)

Loading

@roshansachan
Copy link

@roshansachan roshansachan commented Mar 13, 2016

I pulled the dev branch and noticed that it was still having the error. I tried using the unminified version of dev branch to dig into the issue but strangely the error was gone. The error comes only when using the c3.min.js and works fine with c3.js .

Loading

@vladimirprieto
Copy link

@vladimirprieto vladimirprieto commented Mar 15, 2016

@roshansachan was right. i downloaded dev branch and try with minified version, didn't work just the c3.js works.

Chrome 49.0.2623.87 (64-bit)

Loading

@aendrew
Copy link
Member

@aendrew aendrew commented Apr 30, 2016

Anyone having issues with the dev branch, please do the following:

  1. Run npm install to install all the build dependencies.
  2. Run grunt to build all the distributed files.

I haven't been updating the build files in the dev version because it it makes merging changes easier. Please don't use Bower with the dev branch for the moment!

Loading

@masayuki0812
Copy link
Member

@masayuki0812 masayuki0812 commented May 1, 2016

This has been merged into master as 0.4.11. Thank you!

Loading

wmfgerrit pushed a commit to wikimedia/wikimedia-fundraising-dash-src-bower_modules that referenced this issue Dec 1, 2016
Get this fixed: c3js/c3#1566

Change-Id: Ie430f8aafcddfd19245d065e455c745e9b7e9c40
wmfgerrit pushed a commit to wikimedia/wikimedia-fundraising-dash that referenced this issue Dec 1, 2016
Fixes a Chrome click event bug: c3js/c3#1566

Change-Id: If49f59d8e6b39c3535eca5fc10a767797803f2bd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet