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

bugfix for release 1.0.1

parent a84688df
No related branches found
No related tags found
No related merge requests found
project.name=xchart
build.version=1.0.0
build.version=1.0.1
lib.dir=lib
src.dir=src
web.dir=web
......
File added
......@@ -36,18 +36,10 @@ public class Example4 {
for (int i = 0; i < numRows; i++) {
for (int j = 0; j < numCols; j++) {
// double[][] yData2d = new double[10][1000];
// for (int k = 0; k < yData2d.length; k++) {
// yData2d[k] = getRandomWalk(1000);
// }
// charts[chartCount++] = QuickChart.getChart(i + "," + j, "X", "Y", null, null, yData2d);
charts[chartCount++] = QuickChart.getChart(i + "," + j, "X", "Y", null, null, getRandomWalk(1000));
}
}
new SwingWrapper(charts, numRows, numCols).displayChartMatrix();
}
/**
......@@ -59,11 +51,10 @@ public class Example4 {
private static double[] getRandomWalk(int numPoints) {
double[] y = new double[numPoints];
y[0] = -1000;
for (int i = 1; i < y.length; i++) {
y[i] = y[i - 1] + Math.random() - .5;
}
return y;
}
}
......@@ -49,7 +49,7 @@ public class Axis implements IChartPart {
private double min = Double.MAX_VALUE;
private double max = Double.MIN_VALUE;
private double max = -Double.MAX_VALUE;
/** the bounds */
private Rectangle bounds = new Rectangle(); // default all-zero rectangle
......@@ -90,12 +90,18 @@ public class Axis implements IChartPart {
*/
public void addMinMax(double min, double max) {
// System.out.println(min);
// System.out.println(max);
if (min < this.min) {
this.min = min;
}
if (max > this.max) {
this.max = max;
}
// System.out.println(this.min);
// System.out.println(this.max);
}
public Direction getDirection() {
......
......@@ -178,6 +178,9 @@ public class AxisTick implements IChartPart {
private BigDecimal getGridStep(int tickSpace) {
double length = Math.abs(axis.getMax() - axis.getMin());
// System.out.println(axis.getMax());
// System.out.println(axis.getMin());
// System.out.println(length);
double gridStepHint = length / tickSpace * DEFAULT_TICK_MARK_STEP_HINT;
// gridStepHint --> mantissa * 10 ** exponent
......
......@@ -80,6 +80,8 @@ public class Series {
Arrays.sort(yDataClone);
this.yMin = yDataClone[0];
this.yMax = yDataClone[yDataClone.length - 1];
// System.out.println(yMin);
// System.out.println(yMax);
Color color = SeriesColor.getNextAWTColor();
this.strokeColor = color;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment