Closed ennerf closed 1 year ago
Kudos, SonarCloud Quality Gate passed!
Hey there! I've analyzed the pull request and here's the report for you:
io.fair_acc.chartfx.axes.spi.CategoryAxis
in XYChart.java
(line 5).CategoryAxis
in XYChart.java
(lines 15-34).updateCategories
method of CategoryAxis.java
(line 8).isUsingAxis
method from Renderer.java
(lines 18-23).updateAxes
method in AbstractRendererXY.java
to update categories for CategoryAxis
(lines 14-19).isUsingAxis
method from AbstractRendererXY.java
(lines 24-29).isUsingAxis
method from AbstractRendererXYZ.java
(lines 6-10).XYChart.java
(lines 15-34) can be refactored for better readability. Here's an improved version:if (axis instanceof CategoryAxis catAxis) {
for (Renderer renderer : getRenderers()) {
if (renderer.isUsingAxis(axis) && !renderer.getDatasets().isEmpty()) {
catAxis.updateCategories(renderer.getDatasets().get(0));
break;
}
}
}
I would rate the code a 7 out of 10. The code is generally readable and performs well. However, there are some areas that could be improved for better readability and maintainability.
That's it for the report! Let me know if you need any further assistance. Cheers!
Attention: 4 lines
in your changes are missing coverage. Please review.
Comparison is base (
9508d3c
) 48.09% compared to head (5db1a9b
) 48.09%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I double checked the automatic axis-label setting, and the 11.2.7 behavior was that each renderer tries to use the first dataset. Once the labels get set, a boolean state ensures that the labels do not get overwritten later.
This PR changes the behavior to match the 11.2.7 release.