Skip to content

Web [Charts]: Improve Axis size calculations in order to avoid first/last label overflow

Created by: vovakulikov

Follow up for https://github.com/sourcegraph/sourcegraph/pull/39805

Background

Basically this is still possible to have chart with overflowed labels (even after this improvements about charts axes).

Screenshot 2022-08-03 at 18 20 44

We need to improve axis size calculation and push content rectangle based on axis label sizes and positions to avoid this problem overflowed labels.