Skip to content

Fix bargap 0 bug #709

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

Merged
merged 3 commits into from
Jul 5, 2016
Merged

Fix bargap 0 bug #709

merged 3 commits into from
Jul 5, 2016

Conversation

etpinard
Copy link
Contributor

fixes #708

Bar traces with layout.bargap: 0 and unset marker.line.width have been broken since #124 back in v1.3.0 (oof) when the Bar trace module got split up into separate files.

More specifically, when this line got moved to this line without its default overriding argument made the effective line width in the plot step a NaN (see here).

This PR fixes this bug by correctly setting the marker.line.width default value to 0 in the bar attributes (note that the scatter marker.line.width attribute does not have a dflt value in its attribute s as it depends on whether or not the trace has bubbles - see here)

etpinard added 3 commits June 30, 2016 12:04
- so that plotting code - which relies on marker.line.width to
  set the effective 'bargap' does not error out
- broken since #124
@etpinard etpinard added bug something broken status: reviewable labels Jun 30, 2016
@@ -15,6 +15,19 @@ var extendFlat = require('../../lib/extend').extendFlat;
var scatterMarkerAttrs = scatterAttrs.marker;
var scatterMarkerLineAttrs = scatterMarkerAttrs.line;

var markerLineWidth = extendFlat({},
scatterMarkerLineAttrs.width, { dflt: 0 });
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here it is!

@mdtusz
Copy link
Contributor

mdtusz commented Jul 5, 2016

Good to get this finally fixed. 💃

@etpinard etpinard merged commit 0725ea4 into master Jul 5, 2016
@etpinard etpinard deleted the fix-bargap-0 branch July 5, 2016 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plotting bars: 'bargap: 0' removes first bar
2 participants