Sign in to follow this  

link and labelLink data attributes conflict

Recommended Posts

Taking the following fiddle as an example;


if you edit the data to look something like this;

"data": [{
    "label": "Apple",
    "value": "810000",
    "link": "newchart-xml-apple",
    "labelLink": "j-foo"
}, {
    "label": "Cranberry",
    "value": "620000",
    "link": "newchart-xml-cranberry",
    "labelLink": "j-bar"

the labelLink functions never run because the labels act on the link attribute and load the linked charts.

However if you remove the link attribute completely the labelLink works as you would assume it to, and runs foo() or bar() when clicking the label.


How can I have both of these attributes work together correctly?

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this