I'm using the standard diagram/chart macro from Confluence to display time series data in a line diagram. The data itself is queried from a database using the SQL macro.
When there are only few records in the resulting data table, the date labels are displayed nicely and readable on the x-axis (upper example "few values in x-axis").
But when there are my records (in my example almost 1000), the date labels are displayed overlapping each other, resulting in unreadable black bars (lower example "may values in x-axis").
I've tried playing around with all the parameters you can configure there, but could not find a solution in a way, so that you can actually read these date labels. Of course not all 1000 of them, but at least the left-most and the right-most would be interesting and maybe a handful in the middle.
Any idea?
Hi Mirko,
You can try to use Chart from Table macro. It should show a human readable amount of ticks on the axis, or you can set it manually. This macro is a part of Table Filter and Charts app.
Hi Andrey,
thanks for your answer, but it seems like this "Chart from Table" macro does not work, when the table is produced dynamically by a SQL macro. At least Confluence is telling me, that it cannot add this macro when I click the according button and I should edit the page and insert the macro manually:
It does work with a static table and the result looks indeed good. But I cannot set the amount of ticks manually, there's just no configuration option for this:
But anyways, the possibility of generating charts based on database queries is the feature I'm mostly interested it, because this brings a lot of benefit. Doing this on static data wouldn't help me at all.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What SQL macro do you use?
It looks like it fails to insert the chart when viewing the page, but you can edit the page, add Chart from Table macro and put SQL macro within it.
Use "Scale X step" parameter to set tick size manually:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm using the plain {sql} macro.
But I've just noticed something else, because the chart configuration dialog in your screenshots looks so different from the chart configuration dialog on my machine:
We're obviously talking about different chart macros!
What I was using all the time is the one in the upper right corner of this screenshot (marked red):
But you're obviously using the one that I see in the lower left corner (marked blue).
I didn't see it before or even knew about it (probably it was not available when I started with Confluence years ago :-). But I've tried it out now and have to admit, it looks much better than the one I was using all the time. And the date labels are indeed readable!
So even if your answers didn't exactly answer my questions yet, they've definitely pushed me into the right direction. Thanks for that! :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, I was talking about the second "blue" one. Glad it helped you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is it possible to hide the values of the x axis entirely? I am using a bar chart and have the numbers showing on each bar and the x axis is redundant.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.