-
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
scatterPlot ordinal axis tick position #1135
Comments
I am also facing this same issue. For now I just use a composite chart with a scatter chart as a single compose and this fixes the issue with ordinals data for me. |
Is this issue fixed? |
I updated my original jsfiddle to work with dc.js 3.0.1, the issue is still there. |
Looks like there is a new PR #1361 for scatter plots. I will also check if this works with the above PR. |
You can work around this by setting scatter._rangeBandPadding(1); Not sure why this would happen automatically for a composite chart. I'm also not entirely sure why it works - I'd be hesitant to "fix" the scatter plot this way without understanding why. |
@gordonwoodhull @rrameshkumar76 Thank you for quick replies. I could test that calling
fixes this issue for scatterPlot, lineChart displayed alone as well as in composite / series chart (there it must be called on the composite/series parent chart) @rrameshkumar76 BTW, I also could not fix the issue by just using the composite chart, see http://jsfiddle.net/bourbert/buy69azc/3/ |
I can see how putting a blank line chart in a composite with a scatter plot could fix this, since a composite chart and all of its children share the same scale. This ends up calling scaleBand.paddingInner on the scale. Why the axis does not appear to use the same scale (or same scale, different settings) still confuses me. |
@alexnb Just checked I use ._rangeBandPadding(1) in compose chart. Please see http://jsfiddle.net/rrameshkumar76/fjrozda3/2/ Same as mentioned by @gordonwoodhull and confirmed by you. But now realizing that I can remove compose chart and set this setting on Scatter itself based on above comments. |
How can I position the value points directly above the ticks (or the ticks directly under the points), using DC.js. I could not manage that, DC.js (or D3.js) positions the value points shifted to the left of the ticks, although the X-value is exactly the tick value.
See jsfiddle: http://jsfiddle.net/bourbert/59Lmt98w/
The text was updated successfully, but these errors were encountered: