Charts
The charts answer questions about one metric over all the elements of a table: how its values are spread, where they pile up, what changed and where in the code they are.
Open the charts
Right-click a cell or the header of a metric column and choose Charts... A window opens with the metric, its category and the time in its title:
Charts: Cyclomatic Complexity (method) · 10:15
- The window does not block the IDE. You can open one per metric and keep them next to the results.
- It shows the column as it was when you opened it. If you recalculate or change thresholds, close it and open it again.
- It is drawn from the rows the table shows. With the filter Show Only Rows That Exceed a Threshold on, the charts describe only those rows.
- It closes by itself when you close the tab of its run.
- It follows the theme of the IDE.
The line at the bottom says what the charts are made of:
Elements in the table: 340 · without value: 5 · out of scale (±∞): 1
Elements without a value and with an infinite value are counted there and left out of the charts.
Which tabs you get
The window has up to five tabs. Which ones depends on the metric:
| Tab | Shown for |
|---|---|
| Distribution | Every metric, except those of a package that include its subpackages |
| Cumulative | The same ones as Distribution |
| Concentration | Metrics that are counts, with the same exception |
| Changes | Any metric, while a comparison is shown and the metric has values in both runs |
| Map | Metrics of methods, classes and interfaces |
A metric with none of them has no Charts... in its menu. The window opens on Changes when it is there, and on the first tab otherwise.
Wherever the metric has thresholds, the charts use three zones with fixed colours: OK, Warning and Error.
Distribution
How are the values spread, and how many cross a limit?
A histogram: each bar counts the elements whose value falls in a range, and is split by zone. A dashed line marks
each threshold, labelled with its limit and its origin, for example Warning > 10 (reference) or
Error > 25 (profile).
The line above the chart sums it up:
Methods: 340 · 300 OK · 30 in warning · 10 in error
Cumulative
What share of the elements is at or below a value?
A line that climbs from 0% to 100% as the value grows. Next to each threshold, the chart writes the percentage of
elements to its left: those that do not exceed an upper limit, or those that fall short of a lower one. Rest the
mouse on the line to read a point, such as 90% have ≤ 12.
Median 3 · P90 12 · max. 48
The median is the value half of the elements do not exceed, and P90 the value nine out of ten do not exceed.
Concentration
Which elements add up to most of the total?
A table of the elements from the largest value down, with a bar and three figures: Value, % of total and Cumulative %. The bar takes the colour of the zone of the element.
12 of 340 (3.5%) add up to 50% of the total; 45 (13.2%) add up to 80%
A second line, With value 0: 120, counts the elements that add nothing and are left out of the table.
Changes
What changed since the snapshot?
Available while a comparison is shown (“Comparing two runs”). The lines above sum up the change:
Methods: 345 · new: 8 · removed: 3- With thresholds, the elements in each zone before and now:
OK 300 → 305 (+5) · Warning 30 → 28 (-2) · Error 10 → 12 (+2), andNew in error: 1 · new in warning: 2for the elements that did not exist before. - Without thresholds,
Mean 4.2 → 4.5 · median 3 → 3 · max. 48 → 52.
Under them, for a metric with thresholds, a chart shows the count of each zone side by side, Snapshot and Now. Both use the thresholds of now, so the chart shows how the code moved, not how the limits did.
The table at the bottom, Most worsened, lists the elements whose value moved in the wrong direction, the largest change first, with Before, Now, Change and, when the element changed zone, Zone. For a metric without a better direction the table is Most changed and lists the changes of either sign.
Map
Where is the code, and how is the metric there?
A map of rectangles, one per method, class or interface:
- The size of a rectangle is its lines of code. The lines of a class do not include those of the classes nested in it, which have their own rectangle.
- The colour is the zone of the element when the metric has thresholds. Without thresholds, five tones go from Lower values to Higher values. An element without a value is drawn as No value.
- The groups are packages. For methods, each package is divided again by file.
The first time, the map shows Counting lines… while it reads the size of each element.
Rest the mouse on a rectangle to see the name of the element, its value, how it compares with the thresholds and its lines. Click it to mark it.
Methods: 340 · lines: 12,480
Elements whose code is no longer found are counted in Without code, not in the map: 3.
From a chart to the table
Double-click a row of Concentration or Changes, or a rectangle of the Map, to select that element in the results table, which comes to the front. In the two tables, Enter and F4 do the same. If the table no longer has the element, a balloon says This element is no longer in the results table.
The map works with the mouse only. The same elements and values are in the results table, which the keyboard reaches.