palantir / plottable

:bar_chart: A library of modular chart components built on D3
http://plottablejs.org/
MIT License
2.97k stars 221 forks source link

Using same scale changes widths of bars #3426

Open timwis opened 6 years ago

timwis commented 6 years ago

Bug report

Live example URL: https://www.webpackbin.com/bins/-L-ZL4OfbxdRJslccl6J

Steps to repro:

  1. Create a basic bar plot
  2. Add a rectangle chart that uses the same xScale as the bar plot
  3. Render them as a group

In the live example URL, swap the commented line for the one before it to see it demonstrated.

Expected behavior

Dataset is added to the chart

Actual behavior

The width of the bars in the bar plot change. The only clues I have to what's causing it are that xScale.innerPadding() changes from 0.4 to 0. Any idea why?


For now, a workaround is to manually set xScale.innerPadding(0.4). Hacky but does the job until we hear back on this issue.