Jira Graph Examples
How do I graph Jira tickets?
With the [Jira.Graph:] macro, you can:
- Graph Jira tickets by created or updated time
- Group tickets using one of the fields assignee, fixVersion, issueType, priority, resolution or status
- Use any of the time-related chart types:
- bar, stackedBar, stackedBar100
- Column, StackedColumn, StackedColumn100
- Area, SpineArea, StackedArea, StackedArea100
- Line, Spline, StepLine, FastLine
What's the percentage breakdown of ticket types created each day in a particular week?
Let's look at a week 26-30 June 2023 and use a StackedBar100 chart. The macro and its jql would be:
[Jira.Graph: jql="project=MyProjectName", groupBy=issueType, chartType=StackedBar100, startDate=2023-06-26, endDate=2023-06-30, dateField=created]
- Specify a chart height so that more of the legend is shown: [Jira.Graph: jql="project=MyProjectName", groupBy=issueType, chartType=StackedBar100, startDate=2023-06-26, dateField=created, chartHeight=700]
or - Use the [Settings:] macro at the start of the document to define chart height for all [Jira.Graph:] macros. [Settings: Jira.Graph.chartHeight=700]
The graph now looks like this:
If we think that setting the chart height has made the graph too large, let's instead move the legend beneath the graph with:
[Settings: Jira.Graph.chartHeight=700, Jira.Graph.legendStyle=Table, Jira.Graph.chartAreaHeightPercent=65, Jira.Graph.legendHeightPercent=35, Jira.Graph.chartAreaYPosition=0, Jira.Graph.legendXPosition=0, Jira.Graph.legendYPosition=90, Jira.Graph.chartAreaWidthPercent=100, Jira.Graph.legendWidthPercent=100]
[Jira.Graph: jql="project=MyProjectName", groupBy=issueType, chartType=StackedBar100, startDate=2023-06-26, dateField=created]
We can also add a title and set the size of the title with the titleHeadingLevel parameter. So:
[Jira.Graph: jql="project=MyProjectName", groupBy=issueType, chartType=StackedBar100, startDate=2023-06-26, endDate=2023-06-30, dateField=created, title=Percentage of IssueTypes each day, titleHeadingLevel=2]
gives:
To guarantee unique colours, you'd use set ensureColorsUnique=true. However, the order / colour of the issueTypes in the legend depends on order of discovery. Therefore:
Tip: To have colours consistent across reports, specify your own palette using HTML colors or hex codes.
Our macro and graph now look like this:
[Jira.Graph: jql="project=MyProjectName", groupBy=issueType, chartType=StackedBar100, startDate=2023-06-26, endDate=2023-06-30, dateField=created, title=Percentage of IssueTypes each day, titleHeadingLevel=2, palette=Technical Task^Green;Bug^Peru;Task^DodgerBlue;New Feature^Red;Improvement^LightGray;Story^Green;Epic^Gold;Support Request^DarkBlue;Sub-task^Cyan;Alert^DarkSlateBlue]