# Link color input to chart

**URL:** <https://talk.observablehq.com/t/link-color-input-to-chart/7923>\
**Category:** Help\
**Created:** [May 10, 2023, 6:36pm UTC](https://talk.observablehq.com/t/link-color-input-to-chart/7923 "2023-05-10T18:36:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mferro64](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mferro64/32/6421_2.png) [@mferro64](https://talk.observablehq.com/u/mferro64)\
**Post date:** [May 10, 2023, 6:36pm UTC](https://talk.observablehq.com/t/link-color-input-to-chart/7923/1 "2023-05-10T18:36:36Z")

</div>

I have 2 charts and would like to link the color “fill” from one chart to the color “fill” of the second chart. I have a static 7 day bar chart that has checkbox inputs that drive the second chart. Example use case - select May 3 “orange” & May 8 “purple” - the chart below fill will display the count for each day with the corresponding color - May 3 “orange” & May 8 “purple”.

[https://observablehq.com/d/ba63b7d661134f72](https://observablehq.com/d/ba63b7d661134f72)

Any help is appreciated.

Thanks in advance,

Mike

---

<div class="post-metadata">

**Author:** ![trebor](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/trebor/32/1634_2.png) [@trebor](https://talk.observablehq.com/u/trebor)\
**Post date:** [May 10, 2023, 7:37pm UTC](https://talk.observablehq.com/t/link-color-input-to-chart/7923/2 "2023-05-10T19:37:39Z")

</div>

i looks like you were already hunting around in the right zone here the color clause with:

` // domain: date_legend`

you would want to define a common domain array and use it in both charts. you’d need be sure that the values that are used to select the color are the same in both chart.
