Bar Chart X-Axis Organization for Weeks

Hi all. I’m creating a bar chart and am currently having difficulty arranging the “category column” in the order that I want it. My “category column” is Weeks and my weeks look like the following: Week 1, Week 2, … Week 11, and Week 12. When viewing the bar chart, the Week 1 will be followed by Week 11 and Week 12 before going to Week 2.

I read a few posts on the forum but I am unclear on the best path forward.

Someone here used a CSS editor node, but it’s unclear what was formatted in the node. Another person recommended another solution for months of the year here.

I would love to still be able to display Week 1, Week 2, etc. on my bar graph when this is sorted appropriately.

Hi

Do you have the “Sort bars alphabetically” option selected? If not the bars should be in the original order of the rows in the input table. See screenshot

Best,
Temesgen

2 Likes

Thanks! I had included a sorter node before hand that was sorting alphabetically. However, I am running into one more issue. I have the following Range of weeks (Week -3, Week -2, Week -1, Week 0, Week 1, … Week 11). They are now appropriately organized from the -3 to the 11, but how can I reverse the order on the bar chart, so that it reads LEFT to RIGHT, -3 to 12?

See screenshot please.

You are welcome :slight_smile:

If you have the integer data on the week numbers, as in [-3, -2, ..., 9, 10, 11] you could use that to sort the table right before passing it to the bar chart. If you don’t have it you can create a new column as follows.

  • Replace the "Week " by empty string
  • Convert the result in to Integer

Please don’t forget to mark the previous post as solution.

Best,
Temesgen

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.