Graph expects X-axis value in some lexicographical order?
Asked by Eyal Zmora:

I am trying to display a column graph using "Chart from Table" macro.

My table has 2 columns and looks like this:

Version Duration

V1.20.10 10

V1.20.10.01 20

V1.21.01 4

V1.20.12 10

V1.21.05 20

In this case, only the first 3 versions (V1.20.10, V1.20.10.01, V1.21.01) will be displayed on the X-axis of the graph and I will see only 3 bars, and the 'Duration' values will be wrong.

But when I change "V1.20.12" to "V1.21.02", so now the X-Axis value are ordered lexicographically, everything is displayed fine.

Any idea why?


Answers:
author: Katerina Kovriga {Stiltsoft}
body: Hi [@Eyal Zmora](/t5/user/viewprofilepage/user-id/2480702) ,

Give us some screenshots or smth, because that is how it works for me:

![Thu 8-1.png](https://community.atlassian.com/t5/image/serverpage/image-id/180195i46233D2858AA6ABD/image-size/large?v=v2&px=999 "Thu 8-1.png")

![Thu 8-2.png](https://community.atlassian.com/t5/image/serverpage/image-id/180197i3BAC1E1DEC0DD42F/image-size/large?v=v2&px=999 "Thu 8-2.png")

Seems that everything is displayed as expected.

comments: author: Eyal Zmora
body: When the data is as follows:

|-------------|----------|
| Version     | Duration |
| V4.20.10.03 | 22       |
| V4.21.05.01 | 35       |
| V4.21.10    | 39       |
| V4.21.10.03 | 49       |
| v45         | 56       |

The graph is displayed fine:

![good.png](https://community.atlassian.com/t5/image/serverpage/image-id/180208i68687C7032E8CB2F/image-size/large?v=v2&px=999 "good.png")

But when the data changes to (In ++***Bold***++ is the only change I made):

|-----------------------|----------|
| Version               | Duration |
| V4.20.10.03           | 22       |
| V4.21.05.01           | 35       |
| V4.21.10              | 39       |
| V4.++***20***++.10.03 | 49       |
| v45                   | 56       |

The graph looks like:

![bad.png](https://community.atlassian.com/t5/image/serverpage/image-id/180209i8DBD73E5A2FBE0F5/image-size/large?v=v2&px=999 "bad.png")

Only 4 bars are displayed, and even for them the values are wrong


author: Katerina Kovriga {Stiltsoft}
body: You have the same Versions in the first column of the table - the 1st and the 4th rows.

Their value was summed up: 22+49 = 71 (71 is the first column on the graph).


author: Eyal Zmora
body: OMG... What a silly mistake...

Thanks [@Katerina Kovriga {Stiltsoft}](/t5/user/viewprofilepage/user-id/1464746)


author: Katerina Kovriga {Stiltsoft}
body: Hi there,

As this Community thread concerns our [Table Filter and Charts for Confluence](https://marketplace.atlassian.com/apps/27447/table-filter-and-charts-for-confluence?tab=overview&hosting=cloud&utm_source=atl_community) app, we are happy to introduce its new macro -- [Table Spreadsheet](https://docs.stiltsoft.com/display/public/TFAC/How+to+use+Table+Spreadsheet+macro?utm_source=atl_community).

Our new macro allows you to work with fully functional Excel spreadsheets right in Confluence.

You'll be able to use cells' formulas, filters, conditional formatting, etc., create pivot tables and charts from the page view\&edit mode.

The Table Spreadsheet macro is available for Cloud and Server/Data Center.

![](https://docs.stiltsoft.com/download/attachments/83100938/Conditional%20formatting.png?version=1&modificationDate=1641987630000&api=v2&effects=border-simple,shadow-kn)


author: Pramodh M
body: Hi [@Eyal Zmora](/t5/user/viewprofilepage/user-id/2480702)

Change the Version to some numeric field and use the labels for corresponding versions to display on the chart.

Thanks,  
Pramodh

comments: author: Eyal Zmora
body: Not sure I understand. It does not matter whether Version is a String , a Number or anything else.

If , in the data table, Version is ordered (Numerically or lexicographically), the graph is displayed fine. Otherwise it is not.


Tags: chart

confluence-server

graph

server