[ 3 posts ]

Steven Bedrick

  • Offline
  • Profile

Chart DOM error?

Post Posted: Mon Apr 23, 2012 2:58 pm
+0-
I'm having trouble using the YUI3 chart component. I've set up what looks to me like a very simple bar chart with two data points. If I understand things correctly, this should result in two side-by-side bars; I've also set an option for a legend.

When I load the page, I do see the bars, but I don't see any legend, and mousing over the bars throws a DOM error ("Uncaught Error: NOT_FOUND_ERR: DOM Exception 8"). The gist below contains a minimal example. Any ideas?

Example

Click here to see the revision history on this Gist.


Last edited by davglass on Mon Apr 23, 2012 5:29 pm, edited 1 time in total.
Fixed Gist Include

Tripp Bridges

YUI Developer

  • Username: tripp
  • Joined: Wed Jan 07, 2009 1:54 pm
  • Posts: 435
  • GitHub: tripp
  • Gists: tripp
  • YUI Developer
  • Offline
  • Profile
Tags:

Re: Chart DOM error?

Post Posted: Mon Apr 23, 2012 7:38 pm
+0-
You need to load the 'charts-legend' module to add a legend to the chart.

Code:
YUI().use('charts-legend', function(Y) {
    //your code here
});


That should do it.

Thanks,
Tripp

Steven Bedrick

  • Offline
  • Profile
Tags:

Re: Chart DOM error?

Post Posted: Tue Apr 24, 2012 7:03 am
+0-
Yup, that did it. Thanks for the help!
  [ 3 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum