-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
layers.size() raises exception #1118
Comments
Hi @rlora, thanks for the report. Could you give more detail or a short example which demonstrates the problem you're seeing? And also the exception you're seeing? I take it you are referring to the bar chart code and some recent code which renders labels. I think https://github.com/mbostock/d3/wiki/Selections#size Note that the loop below is also a d3 selection But I don't doubt you're seeing a bug, so let's try to track that down! |
This code was introduced in #1031 |
Hi @gordonwoodhull, thanks for your reply. I'm not sure if you were able to confirm this as a bug. It is happening in BarCharts. I was able to use series and other charts without issues. The charts I'm using are very simple: CHARTS.chart21 = dc.barChart("#_cubesExploreChart-2-1", GLOBAL_SCOPE).elasticY(true);
CHARTS.chart21.colors(d3.scale.ordinal().range(Colors.Brewer.Paired[3]));
CHARTS.chart21.x(d3.scale.ordinal().domain(_.pluck(FILTERS.dimensions.weekday.group().all(), "key"))).xUnits(dc.units.ordinal);
CHARTS.chart21.dimension(FILTERS.dimensions.weekday);
CHARTS.chart21.group(FILTERS.dimensions.weekday.group().reduceSum(d => d.value));
dc.renderAll(GLOBAL_SCOPE); Debugging the exception the Thanks! |
No I wasn't able to confirm it and I can't figure out how a d3 selection object would not have a |
I'm sorry, my bad. I was using the d3 version packaged by Meteor. Turned out it was outdated and there is an official one. Now using 3.5.8 and it works perfectly. Previously using 3.1.4. Appreciate your help :) |
Oh phew, glad that fixed it. Good to know about the interface change and Meteor lagging. |
On dc.js the line
var last = layers.size() - 1;
should bevar last = layers.length - 1;
?I debugged the exception and haven't found a reason why size() its been used.
The text was updated successfully, but these errors were encountered: