Skip to content
Snippets Groups Projects
Commit 6b8c99fa authored by timmolter's avatar timmolter
Browse files

sonar clean up suggestions

parent 6b1dd633
No related branches found
No related tags found
No related merge requests found
...@@ -156,15 +156,15 @@ public class AxisTick implements IChartPart, IHideable { ...@@ -156,15 +156,15 @@ public class AxisTick implements IChartPart, IHideable {
tickLocations.add((int) (margin + tickSpace / 2.0)); tickLocations.add((int) (margin + tickSpace / 2.0));
} else { } else {
final BigDecimal MIN = new BigDecimal(axis.min.doubleValue()); final BigDecimal min = new BigDecimal(axis.min.doubleValue());
BigDecimal firstPosition; BigDecimal firstPosition;
BigDecimal gridStep = getGridStep(tickSpace); BigDecimal gridStep = getGridStep(tickSpace);
double xyz = MIN.remainder(gridStep).doubleValue(); double xyz = min.remainder(gridStep).doubleValue();
if (xyz <= 0.0) { if (xyz <= 0.0) {
firstPosition = MIN.subtract(MIN.remainder(gridStep)); firstPosition = min.subtract(min.remainder(gridStep));
} else { } else {
firstPosition = MIN.subtract(MIN.remainder(gridStep)).add(gridStep); firstPosition = min.subtract(min.remainder(gridStep)).add(gridStep);
} }
for (BigDecimal b = firstPosition; b.compareTo(axis.max) <= 0; b = b.add(gridStep)) { for (BigDecimal b = firstPosition; b.compareTo(axis.max) <= 0; b = b.add(gridStep)) {
......
...@@ -32,7 +32,7 @@ import com.xeiam.xchart.series.markers.Marker; ...@@ -32,7 +32,7 @@ import com.xeiam.xchart.series.markers.Marker;
*/ */
public class ChartLegend implements IHideable { public class ChartLegend implements IHideable {
private final int LEGEND_PADDING = 10; private static final int LEGEND_PADDING = 10;
/** parent */ /** parent */
private Chart chart; private Chart chart;
......
...@@ -19,6 +19,8 @@ import java.awt.Graphics2D; ...@@ -19,6 +19,8 @@ import java.awt.Graphics2D;
import java.awt.Rectangle; import java.awt.Rectangle;
/** /**
* All components of a chart that need to be painted should implement this interface
*
* @author timmolter * @author timmolter
*/ */
public interface IChartPart { public interface IChartPart {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
package com.xeiam.xchart.interfaces; package com.xeiam.xchart.interfaces;
/** /**
* Chart Legend interface * ChartParts that can be set visible or not should implement this interface
* *
* @author timmolter * @author timmolter
*/ */
......
...@@ -65,10 +65,12 @@ public class Series { ...@@ -65,10 +65,12 @@ public class Series {
/** /**
* Constructor * Constructor
* *
* @param <?>
* @param name * @param name
* @param xData * @param xData
* @param xAxisType
* @param yData * @param yData
* @param yAxisType
* @param errorBars
*/ */
public Series(String name, Collection<?> xData, AxisType xAxisType, Collection<Number> yData, AxisType yAxisType, Collection<Number> errorBars) { public Series(String name, Collection<?> xData, AxisType xAxisType, Collection<Number> yData, AxisType yAxisType, Collection<Number> errorBars) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment