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

[BarChart] Support fixed width bars #360

Open
techniq opened this issue Feb 1, 2025 · 0 comments
Open

[BarChart] Support fixed width bars #360

techniq opened this issue Feb 1, 2025 · 0 comments

Comments

@techniq
Copy link
Owner

techniq commented Feb 1, 2025

Currently you can use this workaround

<BarChart {data} x="date" y="value">
  <svelte:fragment slot="marks" let:xScale>
    {@const barWidth = 10}
    {@const xShift = xScale.bandwidth() / 2 - barWidth / 2}
    <Group x={xShift}>
      <Bars radius={5} strokeWidth={0} width={barWidth} />
    </Group>
  </svelte:fragment>
</BarChart>
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

1 participant