-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
support ordinal y scale for bubble/scatter plots #539
Comments
At least for a scatter plot I was able to get a simple example running with both x and y scales ordinal: Looks like the This also works in a seriesChart version: @gordonwoodhull although the above examples work, when i add .renderHorizontalGridLines(true) I get TypeError: scale.ticks is undefined
_dc/dc.coordinateGridMixin/_chart._renderHorizontalGridLinesForAxis coordinate-grid-mixin.js:699:44 Should this go into a new issue? I was able to fix it and can provide a PR. |
I see.. probably because |
This is fixed by using d3v4 in dc.js 3.0, except for the ticks undefined problem, which is fixed by #1448. |
Fix "TypeError: scale.ticks is undefined" when setting .renderHorizontalGridLines(true) on charts with ordinal y scale, see #539
While it has special cases for an ordinal X scale, currently coordinateGridMixin assumes that the Y scale is linear. This doesn't always makes sense for bubble or scatter plots.
Here is a fiddle sort of halfway hacking around the problem in
prepareYAxis
:http://jsfiddle.net/gordonwoodhull/xZFx4/10/
The text was updated successfully, but these errors were encountered: