Skip to content

Conversation

@TeckniX
Copy link

@TeckniX TeckniX commented Mar 1, 2013

Although the for..in is usually correct, it's actually an enumeration instead of a true iteration.
The problem came about when using prototype and jQuery.noConflict().

Prototype by default adds a few extra methods to the Array, enumerating through the array, shows the array method, which the plugin tries to render as bars.
This causes a lot of 'undefined' values to show up. Doing a proper iteration through the jQuery $.each() method makes it work as it should.

TeckniX added 2 commits March 1, 2013 14:17
Although the for..in is usually correct, it's actually an enumeration instead of a true iteration.
The problem came about when using prototype and jQuery.noConflict().

Prototype by default adds a few extra methods to the Array, enumerating through the array, shows the array method, which the plugin tries to render as bars.
This causes a lot of 'undefined' values to show up. Doing a proper iteration through the jQuery $.each() method makes it work as it should.
When multi-bar graph is used, the width between arrays can change.
e.g.: if you have 6 values for 2007, 6 values for 2008, but only 3 values for 2009, the previous code would apply the width of 2009 bars to the 2008 and 2007 bars.
This adds the width to the different bars generated and only does positioning for multi.
@kopipejst
Copy link
Owner

@TeckniX Changes for "Fixed multi bar graph width for data diff size" breaks stack graphs, but I would merge change for "Fixed iteration loop instead of enumeration" if you send separate pull request for that. thanks !

@TeckniX
Copy link
Author

TeckniX commented Apr 18, 2013

I'm honestly not too familiar with how to split the pull requests - I'll see if I can fix the multi bar graph in the meantime

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants