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

Comments

Projects
None yet
@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

This comment has been minimized.

Show comment
Hide comment
@pras2015

pras2015 Jan 31, 2016

Having the same issue in Chrome Version 48.0.2564.97

Works as expected in Firefox 44.0 and IE 11

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

@vipul-jain

This comment has been minimized.

Show comment
Hide comment
@vipul-jain

vipul-jain 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;
};

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;
};

@Roywcm

This comment has been minimized.

Show comment
Hide comment
@Roywcm

Roywcm Feb 2, 2016

Same error here.
Chrome version: 48.0.2564.97

Roywcm commented Feb 2, 2016

Same error here.
Chrome version: 48.0.2564.97

@Roywcm

This comment has been minimized.

Show comment
Hide comment
@Roywcm

Roywcm commented Feb 2, 2016

@sole6

This comment has been minimized.

Show comment
Hide comment
@sole6

sole6 Feb 3, 2016

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

sole6 commented Feb 3, 2016

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

@Roywcm

This comment has been minimized.

Show comment
Hide comment
@Roywcm

Roywcm commented Feb 3, 2016

@kjantzer

This comment has been minimized.

Show comment
Hide comment
@kjantzer

kjantzer Feb 4, 2016

Thanks @Roywcm , that did the trick.

kjantzer commented Feb 4, 2016

Thanks @Roywcm , that did the trick.

@paulbrab

This comment has been minimized.

Show comment
Hide comment
@paulbrab

paulbrab Feb 4, 2016

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

paulbrab commented Feb 4, 2016

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

@bt

This comment has been minimized.

Show comment
Hide comment
@bt

bt Feb 11, 2016

+1, please merge #1564 into master.

bt commented Feb 11, 2016

+1, please merge #1564 into master.

@aendrew

This comment has been minimized.

Show comment
Hide comment
@aendrew

aendrew Feb 18, 2016

Member

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!

Member

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!

@Paulsky

This comment has been minimized.

Show comment
Hide comment
@Paulsky

Paulsky 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?

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?

@brayann

This comment has been minimized.

Show comment
Hide comment
@brayann

brayann 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

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

@aendrew

This comment has been minimized.

Show comment
Hide comment
@aendrew

aendrew Mar 3, 2016

Member

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

Member

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.

@aendrew

This comment has been minimized.

Show comment
Hide comment
@aendrew

aendrew Mar 3, 2016

Member

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.

Member

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.

@aendrew aendrew reopened this Mar 3, 2016

@xtreemrage

This comment has been minimized.

Show comment
Hide comment
@xtreemrage

xtreemrage Mar 9, 2016

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

xtreemrage commented Mar 9, 2016

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

@roshansachan

This comment has been minimized.

Show comment
Hide comment
@roshansachan

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

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 .

@vladimirprieto

This comment has been minimized.

Show comment
Hide comment
@vladimirprieto

vladimirprieto 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)

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)

@aendrew

This comment has been minimized.

Show comment
Hide comment
@aendrew

aendrew Apr 30, 2016

Member

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!

Member

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!

@masayuki0812

This comment has been minimized.

Show comment
Hide comment
@masayuki0812

masayuki0812 May 1, 2016

Member

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

Member

masayuki0812 commented May 1, 2016

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

@ghost ghost referenced this issue Jul 27, 2016

Closed

Closed #1764 by adding translations to SuiteSpots #1794

0 of 2 tasks complete

wmfgerrit pushed a commit to wikimedia/wikimedia-fundraising-dash-src-bower_modules that referenced this issue Dec 1, 2016

Update c3 to 4.11
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

Update c3 library to 4.11
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