Part 3 - Displaying content and generating charts in a dashboard

Overview

For this section, we'll complete the dashboard by displaying content from the project reports and also generate some useful charts with data from the project reports.

By the end of this section you should have something that looks like below.

Source code

The following source code is shared using Confluence Storage Format - the XHTML-based format that Confluence uses to store the content of pages, page templates, blueprints, blog posts and comments.

For more information on how to use this source code on your Confluence, read the following article - How do I use Recipes that use the Storage Format with the Confluence Source Editor?

<p> <ac:structured-macro ac:macro-id="afcf4dba-6f30-4305-9b5f-7270dbdeda14" ac:name="detailssummary" ac:schema-version="2"> <ac:parameter ac:name="showLikesCount">true</ac:parameter> <ac:parameter ac:name="cql">label = "show" and space = currentSpace()</ac:parameter> </ac:structured-macro> </p> <p> <strong>Show Charts</strong> <ac:structured-macro ac:macro-id="a50e28da-b546-4746-a523-f190741c23b4" ac:name="toggle-cloak" ac:schema-version="1"/> </p> <ac:structured-macro ac:macro-id="e0c56781-8f4f-4a72-a6ec-78109ae4242e" ac:name="cloak" ac:schema-version="1"> <ac:rich-text-body> <ac:structured-macro ac:macro-id="f4de998b-ff14-417b-8be9-99f7422adc31" ac:name="section" ac:schema-version="1"> <ac:rich-text-body> <ac:structured-macro ac:macro-id="d98c753c-683c-41c2-997e-bd7fd15b2a4a" ac:name="column" ac:schema-version="1"> <ac:parameter ac:name="width">5%</ac:parameter> <ac:rich-text-body> <p> <br/> </p> </ac:rich-text-body> </ac:structured-macro> <ac:structured-macro ac:macro-id="e7edc8bd-8a2e-441a-aa68-9fbc632742da" ac:name="column" ac:schema-version="1"> <ac:parameter ac:name="width">25%</ac:parameter> <ac:rich-text-body> <ac:structured-macro ac:macro-id="5ed12c7e-1e82-41ff-9cd5-b04d9380fc70" ac:name="chart" ac:schema-version="1"> <ac:parameter ac:name="columns">Title, Cost</ac:parameter> <ac:parameter ac:name="title">Cost</ac:parameter> <ac:parameter ac:name="type">bar</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="3d42238c-b4d1-4799-bb31-c9d3705a1203" ac:name="detailssummary" ac:schema-version="2"> <ac:parameter ac:name="showLikesCount">true</ac:parameter> <ac:parameter ac:name="cql">label = "show" and space = currentSpace()</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> </ac:rich-text-body> </ac:structured-macro> <ac:structured-macro ac:macro-id="ffb31194-40d4-4f8c-b562-ef1292b687ce" ac:name="column" ac:schema-version="1"> <ac:parameter ac:name="width">25%</ac:parameter> <ac:rich-text-body> <ac:structured-macro ac:macro-id="2b6144d6-a91f-4a16-9471-c5778cebbdad" ac:name="chart" ac:schema-version="1"> <ac:parameter ac:name="columns">Title, Remaining Time</ac:parameter> <ac:parameter ac:name="title">Due Date</ac:parameter> <ac:parameter ac:name="type">bar</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="01814e4e-d893-4a45-8723-dd1c8234290b" ac:name="detailssummary" ac:schema-version="2"> <ac:parameter ac:name="showLikesCount">true</ac:parameter> <ac:parameter ac:name="cql">label = "show" and space = currentSpace()</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> </ac:rich-text-body> </ac:structured-macro> <ac:structured-macro ac:macro-id="5e634953-d0a9-4459-85e1-3e7287b6042b" ac:name="column" ac:schema-version="1"> <ac:parameter ac:name="width">25%</ac:parameter> <ac:rich-text-body> <ac:structured-macro ac:macro-id="bf16bf25-8e6c-4447-a7da-47d38e259775" ac:name="chart" ac:schema-version="1"> <ac:parameter ac:name="columns">Title, Team Size</ac:parameter> <ac:parameter ac:name="title">Team Size</ac:parameter> <ac:parameter ac:name="type">bar</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="2ccff793-0da0-4d57-abe0-b26ac0265dc0" ac:name="detailssummary" ac:schema-version="2"> <ac:parameter ac:name="showLikesCount">true</ac:parameter> <ac:parameter ac:name="cql">label = "show" and space = currentSpace()</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> </ac:rich-text-body> </ac:structured-macro> <ac:structured-macro ac:macro-id="b0ccb42d-021c-4be7-b33b-53c28fd9bdc0" ac:name="column" ac:schema-version="1"> <ac:parameter ac:name="width">5%</ac:parameter> <ac:rich-text-body> <p> <br/> </p> </ac:rich-text-body> </ac:structured-macro> </ac:rich-text-body> </ac:structured-macro> </ac:rich-text-body> </ac:structured-macro>

 

Steps

On the draft page

Within the Cloak macro

Within the Section macro

  • add five Column macros

  • edit the Column macros and set the Width parameters for all five columns to "5%", "25%", "25%", "25%", and "5%" respectively

In column two

  • create a Chart macro

    • set its type, Charttitle and columns parameters to "bar", "Cost" and "Title, Cost" respectively

In the Chart macro

In column three

  • create a Chart macro

    • set its type, Chart title and columns parameters to "bar", "Due Date" and "Title, Remaining Time" respectively

Within the Chart macro

In column three

  • create a Chart macro

    • set its type, Chart title and columns parameters to "bar", "Team Size" and "Title, Team Size" respectively

Within the Chart macro

Macro structure

Â