# grouped bar chart - reorder axis

**URL:** <https://talk.observablehq.com/t/grouped-bar-chart-reorder-axis/9230>\
**Category:** Help\
**Created:** [May 7, 2024, 5:28am UTC](https://talk.observablehq.com/t/grouped-bar-chart-reorder-axis/9230 "2024-05-07T05:28:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pk12](https://avatars.discourse-cdn.com/v4/letter/p/e9bcb4/32.png) [@pk12](https://talk.observablehq.com/u/pk12)\
**Post date:** [May 7, 2024, 5:28am UTC](https://talk.observablehq.com/t/grouped-bar-chart-reorder-axis/9230/1 "2024-05-07T05:28:47Z")

</div>

I want to plot a bar chart similar to the on ein this notebook except that I want to reorder the states as specified by an array for example [“NY”, “IL”, “PA”,“FL”,“CA”,“TX”] .

> **[Plot: Grouped bar chart](https://observablehq.com/@observablehq/plot-grouped-bar-chart)**
>
> Facets group the bars by State; the fx domain, representing States, is sorted by the sum total of the heights of the bars (in other words, by total population). Each facet is a simple bar chart, with the ordinal x position ordered by age (keys).

I tried this but it didn’t help and I am not sure what else to try. Can anyone help me sort this out?  
fx: {order: [“NY”, “IL”, “PA”,“FL”,“CA”,“TX”] },

---

<div class="post-metadata">

**Author:** ![Fil](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/fil/32/207_2.png) [@Fil](https://talk.observablehq.com/u/Fil)\
**Post date:** [May 7, 2024, 6:07am UTC](https://talk.observablehq.com/t/grouped-bar-chart-reorder-axis/9230/2 "2024-05-07T06:07:07Z")

</div>

` fx: {domain: ["NY", "IL", "PA","FL","CA","TX"] },`

and remove the _fx_ key from the _sort_ mark option (though it will not change anything once the domain is set).

---

<div class="post-metadata">

**Author:** ![pk12](https://avatars.discourse-cdn.com/v4/letter/p/e9bcb4/32.png) [@pk12](https://talk.observablehq.com/u/pk12)\
**Post date:** [May 21, 2024, 4:01am UTC](https://talk.observablehq.com/t/grouped-bar-chart-reorder-axis/9230/3 "2024-05-21T04:01:06Z")

</div>

Thank you so much! This worked.
