I am trying to create a line chart, please help
Asked by Brett Bullman:

Hi There,

I am trying to create a line chart in confluence but it is just not working no matter what I try.

Please see the excel line graph attached that I am trying to recreate.

I have tried using both a confluence line graph and a time line graph but it just seems to not match the axis up and therefore the data is wrong. I also beleive there might be someting wrong with the date format but have tried them all.

Does anyone have a similar chart working?

Kind Regards,

Brett


Answers:
author: Brett Bullman
body: ![Soruce data.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/185457i62BE54BA456DD031/image-size/large?v=v2&px=999 "Soruce data.PNG")![Date error.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/185455iB1C58FC84027B101/image-size/large?v=v2&px=999 "Date error.PNG")![Line Graph.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/185456i04A1BAAD224B5FCB/image-size/large?v=v2&px=999 "Line Graph.PNG")

comments: author: Katerina Kovriga {Stiltsoft}
body: Thanks, I see now - the error is in the date format.

Go to the macro settings -\> Adjustments tab and set the correct format.

From your error I see that you have **dd M yy** that corresponds, for example, 21 Feb 2022.

As you use Feb-2022, then your format is **M-yy**.


author: Brett Bullman
body: [@Katerina Kovriga {Stiltsoft}](/t5/user/viewprofilepage/user-id/1464746)

So I tried using the date format MM yy which worked in the preview but didn't display anything when saved. So I changed all my dates to the default format it was asking for. This works but displays weeks on the x axis, I only want the dates I have entered in to be on the x axis. is there a way to change this?

![New output.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/185463iEDA2CBE312378EF4/image-size/large?v=v2&px=999 "New output.PNG")![New source.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/185462i7ACE4FC673A4F070/image-size/large?v=v2&px=999 "New source.PNG")


author: Katerina Kovriga {Stiltsoft}
body: Let me two minutes to recreate your table and advise.


author: Brett Bullman
body: I have now resolved this issue by defining the scale X step. Edit -\> Adjustments -\> Scale X Step -\> Added 1m


author: Katerina Kovriga {Stiltsoft}
body: The original date format works fine - you should change it not in the preview, but in the Adjustments tab of the macro settings.

Also it should be not MM yy (it corresponds to February 2022) but **M-yy** as I have mentioned before (it corresponds to the Feb-2022):

![Fri 13-1.png](https://community.atlassian.com/t5/image/serverpage/image-id/185464i66E6B84C6BAE8750/image-size/large?v=v2&px=999 "Fri 13-1.png")

Don't choose the date format from the predefined options - type in the combination that suits your case! The predefined options do not cover all the possibilities, they just include the most common cases.

Your idea with the second step to adjust Xscale was right:

![Fri 13-2.png](https://community.atlassian.com/t5/image/serverpage/image-id/185465i73B2362F7957E63B/image-size/large?v=v2&px=999 "Fri 13-2.png")

And here is the screenshot of the original table:

![Fri 13-3.png](https://community.atlassian.com/t5/image/serverpage/image-id/185466i003F43A2EC969F99/image-size/large?v=v2&px=999 "Fri 13-3.png")


author: Katerina Kovriga {Stiltsoft}
body: Hi [@Brett Bullman](/t5/user/viewprofilepage/user-id/4777556) ,

Can't see your source table and an Excel chart.

What macro do you use? Is it the standard Chart macro or the [Chart from Table](https://docs.stiltsoft.com/display/public/TFAC/How+to+use+Chart+from+Table+macro?utm_source=atl_community) macro provided by 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?

comments: author: Brett Bullman
body: Hi Katerina,

Apologies, please see the source table attached. And this is using the Chart from Table macro.

Thanks


author: Katerina Kovriga {Stiltsoft}
body: Still can't see the attachment - save your screenshots and upload them to the thread. Copy/pasting doesn't work here.


author: Brett Bullman
body: [@Katerina Kovriga {Stiltsoft}](/t5/user/viewprofilepage/user-id/1464746) weird I was importing them. See above.

Thanks


Tags: cloud

confluence-cloud

graph