📜 ⬆️ ⬇️

How to draw graphs and charts in Atlassian Confluence

image

Atlassian Confluence is a powerful solution for deploying an Enterprise Wiki in an organization (although there are no technical problems with using it at home — a license for 10 users costs only 10 US dollars a year). And personally, I like Confluence because it has a friendly interface and allows you to edit content intuitively, easily complementing it with visual components, which allows you to end up with beautiful and easy-to-see pages. By the way, this post is also written in Confluence.

As many know, visualization has a big impact on how content will be perceived. Recently, in any social networks and thematic communities there is a clear trend: if your post does not contain visual information, for example, the same pictures with cats, few people will read it. And if it is also longer than one page ... So, you need to use graphics. And here I refer to the post of comrades from DevExpress , where they brought interesting facts about visualization (alas, without proofs, but the numbers in my opinion are very similar to the truth):


Given the obvious utility of competent visualization and the corporate focus of Confluence, let's try a little drawing directly on the wiki pages. You can draw a lot of things there, but the functionality “out of the box” allows you to draw graphics and insert pictures. But this will not stop us, because in the Atlassian ecosystem, third-party vendors produce a huge number of add-ons for every taste and color, and even the coolest and most expensive product can be picked up and tried for free during a month. And so, if memory serves, up to six times in a row, which gives completely legal six months to think, it will be easier to start denying yourself the convenience of an addon or strangling a damn amphibian to prescribe costs to the budget and finally buy a product.
')

Diagrams in confluence


As I mentioned above, drawing out of the box does not work out very well. But, if we turn our attention to the add-ons, then there are plenty of them for drawing various kinds of diagrams. Let's try to consider those that are most popular and the first to fall into the caring hands of search results. This list includes:


The first four products, from my point of view, are very similar to each other. Perhaps, he even had the fact of “borrowing” certain elements of functionality from each other. They understand the format of Visio, which allows you to not worry about the question “why do we need to redraw all our diagrams” - you can simply import the existing files. The process of drawing diagrams is very similar - elements are added to the page from the image libraries, links between them, and signatures. Many of the addon vendors suggest using their web-based diagrams.

A little apart is the Graphviz Diagrams from Bob Swift . This product violates the principles of the Atlassian ecosystem, where everything is implemented very simply and intuitively clear, but it has its own special charm. Yes, you will need not only to add the addon to Confluence, but also to put the graphviz graph visualization library on your server. But then you can use the powerful DOT language to automatically visualize your data (surely there are people on Habré who don’t represent life without graphs and DOT).

Examples of how diagrams can be drawn using Confluence add-ons and web versions of diagrams:

image
image

What unites these add-ons is the fact that using any of them you can draw stupid charts and diagrams (or simply import from Visio), but here’s the graphics they somehow didn’t ask. Either such functionality (plotting on a table with data) is absent, limited to schematic representations of graphs, or it is inconveniently implemented and it will be difficult for an ordinary user to use this.

An example of how you can use the DOT language and the Graphviz library:

A -> B C -> B B -> C D -> A A -> D 

 e; subgraph clusterA { a -- b; subgraph clusterC { C -- D; } } subgraph clusterB { d -- f } d -- D e -- clusterB clusterC -- clusterB 

image

It is difficult to say which addon is better to choose. Most likely, some secondary to functional things will affect the choice. For example, the ability to work on the server autonomously without access to the Internet or flexible licensing, which allows you not to immediately buy 500 licenses in a large organization, where five people are engaged in drawing such diagrams. Nowadays and the price of a license is often crucial. I tried to reduce the main non-functional characteristics in the table:

AddonSupport
Server / Cloud
Required
the Internet
Flexible
licensing
License price
500 users
Server / Cloud
Support
import / export
visio files
Availability
web versions
Confluence Diagramming by CreatelyWell noYesNot$ 2000 / NoYesNot
Draw.io Diagrams for ConfluenceYes YesYesNot$ 3000 / FreeYesYes
Lucidchart for ConfluenceYes YesYesYesFlexible / FreeYesYes
Gliffy Diagrams for ConfluenceYes YesNotNot$ 6000 / $ 3000YesYes
Graphviz Diagrams for ConfluenceWell noNotNot$ 580 / NoNotNot

Confluence Charts


Googling " confluence charts ", on the first page I got this (frankly, sparsely):


Therefore, we will consider the first two.

In any case, in order to draw a graph, you will need a table with data. This table can appear in Confluence in completely different ways, for example, being created from scratch, imported from CSV, copy-paste from Excel, and even generated from a DBMS query using SQL for Confluence . How the data is formed in the table is not decisive, they just have to be. And from the already existing data, we can build graphics.

Confart Chart Macro

This is a macro built into Confluence that can draw the following types of charts:


The macro has a large number of settings so that your schedule looks exactly as you need. It covers all common scenarios in which you need to draw graphics, but there is a fly in the ointment (even two) - this is a mandatory transition to the page editing mode, even if you only need to change the schedule settings a bit, and a huge amount of these very settings that an unprepared user can scare. True, these spoons are complemented by a barrel of honey - free of charge and documentation with examples, which allows you to understand how it works and build the most simple charts.

This is how, for example, the Area chart looks like:

image

... and here is the 3D Bar chart:

image

... you can see the ratio of sales of different fish in the form of a graphical pie chart (pie chart):

image

Table Filter and Charts

The addon is developed by StiltSoft , which is Atlassian Expert and Atlassian Verified Vendor. He has his pros and cons. In the pros, I note the following:


But, as usual, there should be a minus. It is only one - you have to pay for the addon (the process of installing an addon in Confluence is very simple and it is difficult to consider it a minus).

Addon offers us three macros:


The first of them allows to filter complex tables in Confluence right from the viewing mode “on the fly”. Filtering is also in edit mode, which can sometimes be convenient. The Pivot Table macro allows you to build a pivot table containing aggregated and summed values ​​from large tables with duplicate values. And, finally, the most interesting - Chart from Table. Here he is able to draw graphs, here is a list of possible graphs:


Examples of graphs obtained using Chart from Table

Already familiar to Charts pie chart about fish:

image
Fish type2011
Herring9500
Salmon2900
Tuna1500

Here is a graph of the type stacked column ( Google claims that this is a histogram):

image
200920102011
Revenue12.431.841.1
Expense43.641.831.1

... And this is what a multi-column chart looks like:

image
PeriodOpened
Tickets
Pending
Tickets
Succesfully
Closed Tickets
Tickets Closed
w / o response
Unsuccesfully
Closed Tickets
Total
Tickets
Q1 2015207423812014664
Q2 2015278312475839653
Q3 2015227272002331508
Q4 2015257202375840612


The resulting graph can be downloaded in one click as a picture, or you can change the chart settings directly from the view mode using the settings panel. The settings panel can be hidden, as well as the table with the original data.

image

K-K-K-combo!

The very pulp directly affecting the topic of graphs. Addon components (three macros included in the kit - graphics, filtering and pivot tables) can be safely and skillfully combined. That allows you to build charts that are already inaccessible to the standard macro Charts in a fairly easy and relaxed manner. You can easily build a graph on a filtered pivot table, for example. To do this, we put the table in the Table Filter macro (here we can filter the data, reducing their number), then we put the Table Filter and the table in the Pivot Table macro (it will build the pivot table), and as a cherry on the cake, put the resulting structure into the Chart from macro Table (this macro will draw a graph). It sounds scary, the design is similar to the well-known death of Koscheev. However, in reality, all this is done fairly quickly.

After we once built a hierarchy of data and macros - we can directly change the filtering settings of the source data, the settings of the pivot table and the chart settings right from the page view mode - everything will be immediately recalculated and redrawn. Settings can be immediately saved, and you can play around and leave it as it is - the page will return to its original state upon reloading.

image

Wait, what about JIRA?


And here the guys from Atlassian have a solution right out of the box. First, if you have not yet configured it, you will need an application link between Confluence and JIRA, standard for Atlassian products. After this, Confluence will be able to receive data from JIRA. To visualize this data, the JIRA Charts macro (which, by the way, supports JIRA filters and even jql queries to get the data you need) is included in Confluence. And for the graphic display of the data obtained there are three types of graphs:


An example of a standard pie chart reflecting the quantitative ratio of the tasks for the partners who completed them:

image

... and here is the comparative diagram of the created and solved tasks:

image

An example of a two-dimensional diagram (essentially a simple table):

image

Of course, the data obtained from JIRA can be processed and drawn using the macros that make up Table Filter and Charts. It is possible, of course, to apply filters already in the process of obtaining data from JIRA, so as not to drag and then not filter the excess. And you can simply tighten the minimum filtered data and filter it in place, then bring it to the format of the pivot table and build a graph either from the original filtered data or from the resulting pivot table. And if something does not look as expected - carefully and quickly change the settings of filters or graphs. Combo!

image

Instead of conclusion


Skills of correct data visualization, when all graphs and pictures come to the place and help, but do not interfere with the perception of information, you need to develop. But with good tools, it is much easier to turn them on, because you will not be distracted by the drawing process itself. Hopefully, after this article, someone will cease to consider Confluence another dull corporate Wikipedia and will begin to use the full power of this solution, involving others in the process.

Source: https://habr.com/ru/post/273353/


All Articles