Skip to content
Snippets Groups Projects
Commit 20d3f843 authored by Tim Molter's avatar Tim Molter
Browse files

working space int to double precision

parent 1e4d18c8
No related branches found
No related tags found
No related merge requests found
...@@ -62,13 +62,13 @@ public class AxisTick implements ChartPart { ...@@ -62,13 +62,13 @@ public class AxisTick implements ChartPart {
@Override @Override
public void paint(Graphics2D g) { public void paint(Graphics2D g) {
int workingSpace = 0; double workingSpace = 0.0;
if (axis.getDirection() == Axis.Direction.Y) { if (axis.getDirection() == Axis.Direction.Y) {
workingSpace = (int) axis.getPaintZone().getHeight(); // number of pixels the axis has to work with for drawing AxisTicks workingSpace = axis.getPaintZone().getHeight(); // number of pixels the axis has to work with for drawing AxisTicks
// System.out.println("workingspace= " + workingSpace); // System.out.println("workingspace= " + workingSpace);
} }
else if (axis.getDirection() == Axis.Direction.X) { else if (axis.getDirection() == Axis.Direction.X) {
workingSpace = (int) axis.getPaintZone().getWidth(); // number of pixels the axis has to work with for drawing AxisTicks workingSpace = axis.getPaintZone().getWidth(); // number of pixels the axis has to work with for drawing AxisTicks
// System.out.println("workingspace= " + workingSpace); // System.out.println("workingspace= " + workingSpace);
} }
......
...@@ -41,7 +41,7 @@ public class AxisTickBarChartCalculator extends AxisTickCalculator { ...@@ -41,7 +41,7 @@ public class AxisTickBarChartCalculator extends AxisTickCalculator {
* @param maxValue * @param maxValue
* @param styleManager * @param styleManager
*/ */
public AxisTickBarChartCalculator(Direction axisDirection, int workingSpace, double minValue, double maxValue, ChartPainter chart) { public AxisTickBarChartCalculator(Direction axisDirection, double workingSpace, double minValue, double maxValue, ChartPainter chart) {
super(axisDirection, workingSpace, minValue, maxValue, chart.getStyleManager()); super(axisDirection, workingSpace, minValue, maxValue, chart.getStyleManager());
calculate(chart); calculate(chart);
......
...@@ -36,7 +36,7 @@ public abstract class AxisTickCalculator { ...@@ -36,7 +36,7 @@ public abstract class AxisTickCalculator {
protected final Direction axisDirection; protected final Direction axisDirection;
protected final int workingSpace; protected final double workingSpace;
protected final double minValue; protected final double minValue;
...@@ -53,7 +53,7 @@ public abstract class AxisTickCalculator { ...@@ -53,7 +53,7 @@ public abstract class AxisTickCalculator {
* @param maxValue * @param maxValue
* @param styleManager * @param styleManager
*/ */
public AxisTickCalculator(Direction axisDirection, int workingSpace, double minValue, double maxValue, StyleManager styleManager) { public AxisTickCalculator(Direction axisDirection, double workingSpace, double minValue, double maxValue, StyleManager styleManager) {
// override min/max value for bar charts' Y-Axis // override min/max value for bar charts' Y-Axis
double overrideMinValue = minValue; double overrideMinValue = minValue;
......
...@@ -37,7 +37,7 @@ public class AxisTickDateCalculator extends AxisTickCalculator { ...@@ -37,7 +37,7 @@ public class AxisTickDateCalculator extends AxisTickCalculator {
* @param maxValue * @param maxValue
* @param styleManager * @param styleManager
*/ */
public AxisTickDateCalculator(Direction axisDirection, int workingSpace, double minValue, double maxValue, StyleManager styleManager) { public AxisTickDateCalculator(Direction axisDirection, double workingSpace, double minValue, double maxValue, StyleManager styleManager) {
super(axisDirection, workingSpace, minValue, maxValue, styleManager); super(axisDirection, workingSpace, minValue, maxValue, styleManager);
dateFormatter = new DateFormatter(styleManager); dateFormatter = new DateFormatter(styleManager);
......
...@@ -37,7 +37,7 @@ public class AxisTickLogarithmicCalculator extends AxisTickCalculator { ...@@ -37,7 +37,7 @@ public class AxisTickLogarithmicCalculator extends AxisTickCalculator {
* @param maxValue * @param maxValue
* @param styleManager * @param styleManager
*/ */
public AxisTickLogarithmicCalculator(Direction axisDirection, int workingSpace, double minValue, double maxValue, StyleManager styleManager) { public AxisTickLogarithmicCalculator(Direction axisDirection, double workingSpace, double minValue, double maxValue, StyleManager styleManager) {
super(axisDirection, workingSpace, minValue, maxValue, styleManager); super(axisDirection, workingSpace, minValue, maxValue, styleManager);
numberFormatter = new NumberFormatter(styleManager); numberFormatter = new NumberFormatter(styleManager);
......
...@@ -39,7 +39,7 @@ public class AxisTickNumericalCalculator extends AxisTickCalculator { ...@@ -39,7 +39,7 @@ public class AxisTickNumericalCalculator extends AxisTickCalculator {
* @param maxValue * @param maxValue
* @param styleManager * @param styleManager
*/ */
public AxisTickNumericalCalculator(Direction axisDirection, int workingSpace, double minValue, double maxValue, StyleManager styleManager) { public AxisTickNumericalCalculator(Direction axisDirection, double workingSpace, double minValue, double maxValue, StyleManager styleManager) {
super(axisDirection, workingSpace, minValue, maxValue, styleManager); super(axisDirection, workingSpace, minValue, maxValue, styleManager);
numberFormatter = new NumberFormatter(styleManager); numberFormatter = new NumberFormatter(styleManager);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment