Blog Post

Identify Coverage Holes with the Codecov Sunburst Chart

March 1, 2023 Tom Hu

In 2020, Codecov started to rethink how developers understand and use their code coverage. As a result, we completely redesigned our pages to make them faster and more useful to our users. However, many of you who used Codecov at the time know the sunburst coverage chart that was used to help quickly identify large parts of your codebase that weren’t tested has disappeared.

And you were not happy.

Well, we heard you. We are proud to announce that the sunburst coverage chart is back!


This chart is a way to quickly see what parts of your codebase are not tested. The chart is interactive, so you can click on individual slices of it to drill down into subdirectories and files.


How do I use the sunburst coverage chart?

The chart shows you all the directories and files two levels deep. This helps you to focus your attention on broad parts of your codebase at the same time. Directories and files are represented as arcs on the chart. Directories are sized proportionally to the number of files and lines contained in them. Files will not necessarily fill the chart and are colored lighter to distinguish them from directories. Hovering over a sector of the chart will display the directory or file that can be selected.

Coverage information is also included in the sunburst chart. For directories or files that are poorly covered, they will show as red. For those that are covered sufficiently, they will show as green. Yellow also exists to indicate directories or files that may be moderately covered.

To get back to the parent directory, you can click the center .. of the chart.

To view a file, dig into the chart until you are in the proper folder. Then, click on the filename below the chart to view coverage for that file.


Changing the Sunburst Coverage Chart Thresholds

If you are looking to change the coverage thresholds of the sunburst chart, you can add the following to your codecov.yml file.

  range: 60..80

Default setting ranges can be found below. If you want different thresholds, you can change the numerical values.

  • Files below 60% coverage are red
  • Files above 80% are green
  • Files between 61% and 79% are yellow


Where Can I find the Sunburst Coverage Chart?

The sunburst chart is readily available to all users, and you can find it in the dashboard of any of your repositories.

If you’d like to praise the sunburst, you can leave your feedback here. We’d love to hear from you!

Before we redirect you to GitHub...
In order to use Codecov an admin must approve your org.