Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Clip path code broken in latest master #789

Closed
bigianb opened this issue Dec 11, 2014 · 6 comments
Closed

Clip path code broken in latest master #789

bigianb opened this issue Dec 11, 2014 · 6 comments
Labels
Milestone

Comments

@bigianb
Copy link

bigianb commented Dec 11, 2014

Since updating to master, I see the following error when displaying a chart:
Failed to execute query: '#1-clip' is not a valid selector.
I'm pretty sure this is due to pr #733

Digging a bit more, the issue is that the default anchor name starts with a number ... and DOM ids must start with a letter. Making the change below (i.e. changing '' in the last line to 'id') fixes the issue as the id now starts with a letter.

_chart.anchorName = function () {
        var a = _chart.anchor();
        if (a && a.id) {
            return a.id;
        }
        if (a && a.replace) {
            return a.replace('#', '');
        }
        return 'id' + _chart.chartID();
    };
@gordonwoodhull
Copy link
Contributor

Thanks @bigianb. This may also be related to #685, or more likely the bug was already there but was masked by the bug #733 fixes, as the number id behavior has been there for some time.

@bigianb
Copy link
Author

bigianb commented Dec 11, 2014

Yes, I agree.

@r4j4h
Copy link
Contributor

r4j4h commented Dec 16, 2014

I don't know if this is actually the fix you would like to see @gordonwoodhull , but I put in bigian's change in a PR as master is definitely broken for me without this so perhaps we should merge it in at least in the interim to a better solution?

@r4j4h
Copy link
Contributor

r4j4h commented Jan 5, 2015

Just updating this issue ticket that my PR is now good to go. :) 👍

@Frozenlock
Copy link
Contributor

Just wanted to chime in: I get the same error when trying any version after early December.

Without being familiar with the code, I tried to pinpoint the origin:
da2d4ee#commitcomment-9174465

@gordonwoodhull
Copy link
Contributor

fixed by #800

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants