Billboard.js: Scroll affects bar width

Created on 30 Jun 2020  路  6Comments  路  Source: naver/billboard.js

Description

It seems srolling zoomed bar chart affects the width of bars.

Steps to check or reproduce

  1. Show https://jsfiddle.net/psc1gjm4/
  2. Scroll to the right(Drag the chart to the left).
bug

All 6 comments

The width of bar will get narrow.
1
2

https://jsfiddle.net/5962c3pn/
billboard.js v1.11.1 won't reproduce this issue.

The update of width size by zoom was applied from #1185.
This issue seems related with that update. I'll check for that.

Thanks for the report!

This issue seems related with that update.

93184a2

The width of bar will get narrow.

  • In getBarW, tickInterval will change. $$.subX.domain()[1] and maxDataCount won't change.
  • In xx(d), $$.zoomScale(d) will change.
  • In scale(d) of getCustomizedScale, scaleValue(d) will change.

In d3.js,

  • In scale(x) of transformer$1, the value output returned will change.
  • In function(x) of bimap(domain, range, interpolate$$1), d0(x) will change.

getCustomizedScale will be called from zoom.updateTransformScale.

$$.zoomScale = $$.getCustomizedScale(newScale);

I could not see what's the right way to update scale.

It seems zoomScale should not change even if x-offset will get larger when scrolling to right.
X-offset may possibly affect zoomScale.

@watnab, released 2.0.0-next.8 with the fix.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gyuhyeon picture gyuhyeon  路  3Comments

bogdan-iuga picture bogdan-iuga  路  3Comments

drazik picture drazik  路  4Comments

stevenmusumeche picture stevenmusumeche  路  3Comments

creage picture creage  路  4Comments