The {rate-table} macro is used to show statistics gathered from the rate macro...
This macro displays tabular data showing the distribution of votes for ratings gathered by the rate macro. When combined with the chart macro, this data can be conveyed graphically using pie charts, etc.
This macro requires Confluence 2.0 or above.
This macro is used as shown below:
{rate-table:keys=x|overall=o|breakdown=b|ceo=id}
Parameters
Parameter
Required
Default
Notes
keys
Default Rating
By default, the macro will show the statistics for a rating with no specified key. If you have multiple ratings, or a rating with a specified key, you can specify a list of keys to include.
overall
true
By default, the Overall Rating column will be shown at the end of the table. Set this parameter to false to hide it.
breakdown
true
By default the table will show a breakdown of votes cast for each rating level. Set this parameter to false to hide it.
ceo
Current Content
Normally the macro will gather statistics stored in the content in which it is placed. However, if you want to extract statistics from ratings on other pages, ec., specify the Confluence Entity Object ID for the content holding the ratings.
This plug-in is available without cost for both commercial and non-commercial purposes. However, if you have found it to be useful, particularly within a commercial environment, please consider making a donation to the author. This will encourage continued development of this and other plug-ins, as well as speeding up the response for your latest maintenance request.
If you wish to donate, it can be done easily with a credit card or bank transfer using PayPal. No account sign-up is required for credit or debit card payments.
Adaptavist maintain a JIRA Project for tracking bug reports and feature requests for this macro. The currently reported items are shown below:
jiraissues: Could not download[ http://jira.adaptavist.com/secure/IssueNavigator.jspa?view=rss&pid=10082&component=10162&statusIds=1&statusIds=3&statusIds=4&statusIds=5&sorter/field=updated&sorter/order=DESC&tempMax=25&reset=true&decorator=none] : caused by : Circular redirect to 'http://jira.adaptavist.com:80/secure/IssueNavigator.jspa'
Then display statistics for that rating panel as follows:
{rate-table}
The macro will output a table showing how many votes have been cast for each rating level and the overall value of the rating:
Terrible
Poor
Average
Good
Amazing
Overall Rating
255
1
1
2
5
7
4.0
The 255 value in the first column is the automatically assigned "key" for the rating, defaulting to the database ID for the content in which you placed the rating panel. If you want a more descriptive key, see Example #3.
Pie Chart Visualisation
To display a pie chart of the vote distribution, disable the "overall rating" column and wrap the macro inside the chart macro as follows:
Don't add any new lines between the chart and rate-table macro tags otherwise the chart will not display.
Using Keys
If you don't specify a key for your rating, the internal database ID of the content will be used. In order to get something a bit more friendly, especially if you are using multiple rate macros on the same page, specify the key for each rating panel as shown in the following example:
{rate:key=Readability}
{rate:key=Usability}
To display results for just one of these rating panels, specify it's unique key:
{rate-table:keys=Readability}
Which results in:
Terrible
Poor
Average
Good
Amazing
Overall Rating
Readability
1
1
2
5
7
4.0
To include multiple ratings in the table, include their keys separated by commas as shown below:
{rate-table:keys=Readability,Usability}
Which results in:
Terrible
Poor
Average
Good
Amazing
Overall Rating
Readability
1
1
2
5
7
4.0
Usability
1
3
1
3
7
3.8
You can generate a nice summary chart as shown below:
Increase the height of the chart by 25 for each rating included. For example, if you have 3 ratings to compare, the height would be 25*3 = 75.
Don't add any new lines between the chart and rate-table macro tags otherwise the chart will not display.
Remote Statistics
Normally, the {rate-table} macro is added to the same content that contains the rate macro. However, there may be scenarios where you want to display rating statistics on a different page or location to where they were obtained. For example, you might have a summary page showing rating statistics from several different pages.
To pull rating data from a different location, use the following:
{rate-table:ceo=1234}
Where 1234 is the ID of the content that contains the rating data.
So how do you get that ID? Well, the easiest way is to add a rate-table macro to the content containing the ratings panels. As shown in Example #1, the ID will be shown in the first column - that's the ID to use in the rate-table macro when pulling statistics from ratings on a different page.
Hints and Tips
Monitor ratings across various versions of a page by altering the rating key. For example, on the first version of the page use:
{rate:key=ReadabilityV1}
Then, after updating the page to a degree sufficient to have it re-rated, change the key:
{rate:key=ReadabilityV2}
In the summary table, you can then display both keys as the rating data for V1 will still be retained, even if there is no ratings panel for that version any more:
{rate-table:keys=ReadabilityV1,ReadabilityV2}
This would allow you to see if the second major version of a page was getting improved ratings over the previous version.
Frequently Asked Questions
Q
Why do I have to use database ID's when pulling ratings from other pages?
A
It was a last minute feature added prior to releasing the macro. As such it's not overly polished and will hopefully be simplified in a later release.
Not at present - the ratings don't track who has rated - they merely use a cookie so that your web browser can tell Confluence that the person looking at the page has rated it.
We could upgrade the macro to track usernames against ratings, however that would likely cause problems in scenarios where site owners want anonymous ratings to be taken (eg. conference sites, etc). I guess a compromise might be to add a new parameter to set the mode of the rating panels so that you can either run in anonymous mode (anyone can rate) or tracked mode (only logged in users can rate)?
Hi,
I like to extract statistics from ratings on other pages and display the same in some other page in chart format. For this it is specified to use ceo(Confluence Entity Object ID) for the content holding the ratings. Can anyone tell me from where to get this ceo. Can I get this using some macro?
Hi Dan,
I am trying to get the rating of page using the following command:
{rate-table:keys=PageRating|ceo=594}
Where 594 is the pageId of mine page where I had applied a rate macro with key as 'PageRating'.
But I am not getting the table data it is coming out as all zeros.
It may well be a bug, for which I don't currently have time to fix. RATE-2 shows the same problem, however a solution has yet to be found.
There are several things I would like to do (including making ratings searchable against the content and storing worked out metadata along with the raw stats) ... however it's a time limitation issue.
Has there been any update to this. I still seem to be having this problem. There are multiple ratings on one page (each with unique keys), but I cannot pull these statistics from another page. The above syntax doesn't work nor does a simple
I have downloaded rating macro from this site.It is working almost fine.But the problem is when I am trying to give more than one rating the page takes only the last one.It does not count the total rating.So as for
Is it possible to allow the rate-table macro to display the usernames of those who voted for each option?
Not at present - the ratings don't track who has rated - they merely use a cookie so that your web browser can tell Confluence that the person looking at the page has rated it.
We could upgrade the macro to track usernames against ratings, however that would likely cause problems in scenarios where site owners want anonymous ratings to be taken (eg. conference sites, etc). I guess a compromise might be to add a new parameter to set the mode of the rating panels so that you can either run in anonymous mode (anyone can rate) or tracked mode (only logged in users can rate)?
Hi,
I like to extract statistics from ratings on other pages and display the same in some other page in chart format. For this it is specified to use ceo(Confluence Entity Object ID) for the content holding the ratings. Can anyone tell me from where to get this ceo. Can I get this using some macro?
When you edit a page, the CEO (Page) id is shown in the address bar.
Hi Dan,
I am trying to get the rating of page using the following command:
{rate-table:keys=PageRating|ceo=594}
Where 594 is the pageId of mine page where I had applied a rate macro with key as 'PageRating'.
But I am not getting the table data it is coming out as all zeros.
It may well be a bug, for which I don't currently have time to fix. RATE-2 shows the same problem, however a solution has yet to be found.
There are several things I would like to do (including making ratings searchable against the content and storing worked out metadata along with the raw stats) ... however it's a time limitation issue.
Has there been any update to this. I still seem to be having this problem. There are multiple ratings on one page (each with unique keys), but I cannot pull these statistics from another page. The above syntax doesn't work nor does a simple
I have downloaded rating macro from this site.It is working almost fine.But the problem is when I am trying to give more than one rating the page takes only the last one.It does not count the total rating.So as for
Where can I find the rate-table macro?
Hi,
Is there any way to limit the rate table to just show the top rated pages in the current space?