How to find the ID for a table to use in a Bar Chart macro?
Asked by Katarina Palm:

Hi!

I am trying to create a Bar chart using the Chart macro. I have filter for the data I want to show; works fine with a standard pie chart. But when creating a bar chart, I am expected to enter a comma separated list for the table ID(s) to use. I have tables of data on my page, How do I find table IDs?


Answers:
author: Katerina Kovriga {Stiltsoft}
body: Hi [@Katarina Palm](/t5/user/viewprofilepage/user-id/4170744) ,

As I understand from the [Atlassian documentation](https://support.atlassian.com/confluence-cloud/docs/insert-the-chart-macro/), the table id selection may be only required if your page structure is very complex, for example, you use section and column macros inside the chart macro body and your tables are all mixed up.

If you use a simple layout, then it is not necessary to fill in this field and you may leave it blank:

![Mon 3-1.png](https://community.atlassian.com/t5/image/serverpage/image-id/119328i5DC88CB6028C22EC/image-size/large?v=v2&px=999 "Mon 3-1.png")![Mon 3-3.png](https://community.atlassian.com/t5/image/serverpage/image-id/119329i40327758BCC8DB71/image-size/large?v=v2&px=999 "Mon 3-3.png")The standard Chart macro is not very flexible (besides it doesn't work with the dynamic macros), so we can recommend to use the [Chart from Table](https://docs.stiltsoft.com/display/public/TFAC/Column%2C+Stacked+Column%2C+Bar%2C+Stacked+Bar+chart+types) macro provided by the [Table Filter and Charts for Confluence](https://marketplace.atlassian.com/apps/27447/table-filter-and-charts-for-confluence?hosting=cloud&tab=overview) app.

Let's take the same table as an example:

![Mon 3-2.png](https://community.atlassian.com/t5/image/serverpage/image-id/119330i67408935B76C21B5/image-size/large?v=v2&px=999 "Mon 3-2.png")![Mon 3-4.png](https://community.atlassian.com/t5/image/serverpage/image-id/119331iD092C2C983DEB690/image-size/large?v=v2&px=999 "Mon 3-4.png")![Mon 3-5.png](https://community.atlassian.com/t5/image/serverpage/image-id/119332i2CE59AA5F9E52351/image-size/large?v=v2&px=999 "Mon 3-5.png")As you can see, you can filter what items to include into your chart.

This example was created for the Horizontal table orientation:

![Mon 3-6.png](https://community.atlassian.com/t5/image/serverpage/image-id/119335i00C188AC110B8A31/image-size/large?v=v2&px=999 "Mon 3-6.png")

And now let's choose the vertical one:

![Mon 3-7.png](https://community.atlassian.com/t5/image/serverpage/image-id/119333iE501B6DCEB1312FB/image-size/large?v=v2&px=999 "Mon 3-7.png")![Mon 3-8.png](https://community.atlassian.com/t5/image/serverpage/image-id/119334i3F931E22919C4ADC/image-size/large?v=v2&px=999 "Mon 3-8.png")Our chart has changed - now you can choose which form is more relevant to your case.


author: Michelle Rau HP
body: Oh man, I got this to work once and now I can't remember all the details!

The documentation says "Comma separated list of table ids and/or table numbers (starting at 1) ."

Within the Chart macro, you can have more than 1 table. By default, it appears that the Chart macro will chart the data from all the tables within the macro (combines data). If you tell it table ID 1, then it will only chart the data from the first table. If you tell it table ID 2, then it will only chart the data from the second table, and so on.

[https://support.atlassian.com/confluence-cloud/docs/insert-the-chart-macro/](https://support.atlassian.com/confluence-cloud/docs/insert-the-chart-macro/?)

comments: author: trobbs
body: The link provided doesn't work (extra characters at the end) so [here's a link that does.](https://support.atlassian.com/confluence-cloud/docs/insert-the-chart-macro/)


author: Katarina Palm
body: Thanks! I saw this option in other answers, but I am primarily looking for a solution within the standard product. Seems it is not very well supported, tough...

BRs, Katarina


Tags: chart

cloud

confluence-cloud