Skip to content
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

bar charts axis starting at non-zero #480

Closed
Carrie0302 opened this issue May 13, 2016 · 3 comments
Closed

bar charts axis starting at non-zero #480

Carrie0302 opened this issue May 13, 2016 · 3 comments
Assignees

Comments

@Carrie0302
Copy link

When I change the "range" on my y-axis it changes the axis values, but not the value of the bar chart so the bars are drawn over the x axis. In my example I want to change the y axis so the bar chart starts from 5 rather then 0. I played around adjusting the domain to see if this was the issue, but I am a newbie so this might boil down to my misunderstand of domains and ranges in D3.
.y({ "label": ""+ uniqueVal_IndicatorInfo[0].LongName+ " (" + uniqueVal_IndicatorInfo[0].Unit +")", "domain" : [5, 12], "range": [5, 12], "scale": "linear", "value": "Value"

@davelandry davelandry changed the title Changing Range on Y Axis Draws Bars over the X Axis bar charts axis starting at non-zero May 23, 2016
@davelandry davelandry self-assigned this May 23, 2016
@davelandry davelandry added the Bug label May 23, 2016
@davelandry
Copy link
Member

@Carrie0302 thanks for finding this, it will be included in the next release.

@paulofelipe
Copy link

Dave, after this change is not possible to use the old behavior anymore? Draw negative bars from zero line like this example: https://jsfiddle.net/paulofel/ykcbse2L/

In this new version the result is: https://jsfiddle.net/paulofel/t0dwapsq/

I opened a topic in d3plus google group, but I don't know where is more appropriate to discuss this issue.

Thanks.

@davelandry
Copy link
Member

yikes, that's my bad. I'm fixing this now and it will be part of the next release.

definitely a bug, this is the right place to post it. I would say this even warrants it's own issue: #485

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

No branches or pull requests

3 participants