Uh oh!
There was an error while loading. Please reload this page.
copy histogram autobinx/y back to the input trace - #1901
Conversation
on par with colors and axis ranges
| var autoBinAttr = 'autobin' + maindata; | ||
| var binspec = trace[binAttr]; | ||
| if((trace[autoBinAttr] !== false) || !binspec || | ||
| binspec.start === null || binspec.end === null) { |
There was a problem hiding this comment.
note that cleanBins provides a size even if there are no start or end. This also doesn't allow you to specify a start and no end or things like that. So partial bin definition might do strange things... but that I would definitely consider a feature we could propose to add, rather than a bug to fix.
Also note that !(binAttr in trace) in the old version never failed, since we default to null for start and end (which might have been important to enable cleanBins?) - so in principle I could omit !binspec here, just thought it prudent in case there's some context I'm not aware of that can call this calc.
| expect(gd._fullData[0].autobiny).toBe(true); | ||
| }); | ||
| it('respects explicit autobin: false as a one-time autobin', function() { |
etpinard
commented
Jul 20, 2017
Nicely done and thanks for not forgetting about |
on par with colors and axis ranges
fixes#24
@etpinard are you OK with this?