# Preserving legend when zooming

**URL:** <https://talk.observablehq.com/t/preserving-legend-when-zooming/8701>\
**Category:** Help\
**Created:** [January 16, 2024, 3:14pm UTC](https://talk.observablehq.com/t/preserving-legend-when-zooming/8701 "2024-01-16T15:14:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kgish](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/kgish/32/8188_2.png) [@kgish](https://talk.observablehq.com/u/kgish)\
**Post date:** [January 16, 2024, 3:14pm UTC](https://talk.observablehq.com/t/preserving-legend-when-zooming/8701/1 "2024-01-16T15:14:49Z")

</div>

My legend zooms/pans along with chart, but I want it to stay the same size in the same position.

What’s the correct way to achieve this?

---

<div class="post-metadata">

**Author:** ![CAYdenberg](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/caydenberg/32/5322_2.png) [@CAYdenberg](https://talk.observablehq.com/u/CAYdenberg)\
**Post date:** [January 16, 2024, 5:41pm UTC](https://talk.observablehq.com/t/preserving-legend-when-zooming/8701/2 "2024-01-16T17:41:41Z")

</div>

Can you provide a link or some sample code?
