Skip to content

Compare

Compare shows the difference between two maps instead of a single one. Load two versions of a codebase, such as the last release and today, and every building is colored by how its metric changed, so growth, clean-ups, new and removed files stand out.

Compare between two maps of CodeCharta, with grown files in green and shrunk or removed files in red

  1. Load at least two maps. Select several files at once in the file picker (Shift or Ctrl/Cmd click, as your operating system offers), or open them one after the other. See Loading maps.
  2. Point at the Metric tab and pick Compare in the mode bar.

Compare belongs to the Metric view and is not offered while the map layout is Sunburst or Radial TreeMap. To link straight to a comparison, add mode=Delta to a URL with two file parameters; the first map becomes the reference. See Visualization URL Parameters.

Explore in the mode bar leaves Compare and shows the maps you had before.

While Compare is on, the top bar shows two map selectors:

  • Reference (left): the map you compare from.
  • Comparison (right): the map you compare to.

The delta is the comparison minus the reference. The swap button between the selectors (Switch reference and comparison file) exchanges them, which turns every increase into a decrease. It is enabled once a comparison map is picked.

In Compare the building colors stand for the change of the height metric:

  • Green: the value increased.
  • Red: the value decreased.
  • Gray: unchanged, or flattened.

Invert colors in the color settings swaps green and red, for a metric where more is better. The color settings in Compare offer only the two delta colors, and the legend shows them as +Δ positive delta and –Δ negative delta.

The metric bar shows the change in numbers: next to the sum (Σ) of each metric comes its delta, for example Σ 18,679 Δ11,506 for complexity.

Click a building or a folder to see its changes in the Inspector:

The Inspector in Compare for a removed folder, with 29 removed files and negative deltas

  • Every metric shows its change next to its value, such as Δ-162, in the delta colors.
  • A folder shows how many of its files were added, removed and changed, for example Δ0 Δ-29 Δ0 for a folder whose 29 files were all removed.

The Dependencies view shows a single map, so it asks you to leave Compare first.