Skip to content
Snippets Groups Projects
Commit f01f12e5 authored by Alex Nugent's avatar Alex Nugent
Browse files

Merge branch 'refs/heads/master' of ssh://alexnugent@192.168.1.13/home/k/repositories/XChart

parents 9282bd61 7e6566ef
No related branches found
No related tags found
No related merge requests found
...@@ -131,10 +131,10 @@ public class AxisTick implements IChartPart { ...@@ -131,10 +131,10 @@ public class AxisTick implements IChartPart {
*/ */
private void determineAxisTick() { private void determineAxisTick() {
System.out.println("workingSpace= " + workingSpace); // System.out.println("workingSpace= " + workingSpace);
int tickSpace = AxisPair.getTickSpace(workingSpace); int tickSpace = AxisPair.getTickSpace(workingSpace);
System.out.println("tickSpace= " + tickSpace); // System.out.println("tickSpace= " + tickSpace);
int margin = AxisPair.getMargin(workingSpace, tickSpace); int margin = AxisPair.getMargin(workingSpace, tickSpace);
......
...@@ -72,13 +72,15 @@ public class PlotContent implements IChartPart { ...@@ -72,13 +72,15 @@ public class PlotContent implements IChartPart {
for (int i = 0; i < xData.length; i++) { for (int i = 0; i < xData.length; i++) {
if (Double.isInfinite(xData[i]) || Double.isNaN(xData[i])) { // if (Double.isInfinite(xData[i]) || Double.isNaN(xData[i])) {
throw new RuntimeException("Infinite or NaN values in xAxis Data not allowed!!!"); // throw new RuntimeException("Infinite or NaN values in xAxis Data not allowed!!!");
} // }
//
// if (Double.isInfinite(yData[i]) || Double.isNaN(yData[i])) {
// throw new RuntimeException("Infinite or NaN values in yAxis Data not allowed!!!");
// }
if (Double.isInfinite(yData[i]) || Double.isNaN(yData[i])) { if (!Double.isInfinite(xData[i]) && !Double.isNaN(xData[i]) && !Double.isInfinite(yData[i]) && !Double.isNaN(yData[i])) {
throw new RuntimeException("Infinite or NaN values in yAxis Data not allowed!!!");
}
int xTransform = (int) (xLeftMargin + ((xData[i] - xMin) / (xMax - xMin) * xTickSpace)); int xTransform = (int) (xLeftMargin + ((xData[i] - xMin) / (xMax - xMin) * xTickSpace));
int yTransform = (int) (bounds.getHeight() - (yTopMargin + (yData[i] - yMin) / (yMax - yMin) * yTickSpace)); int yTransform = (int) (bounds.getHeight() - (yTopMargin + (yData[i] - yMin) / (yMax - yMin) * yTickSpace));
...@@ -116,3 +118,4 @@ public class PlotContent implements IChartPart { ...@@ -116,3 +118,4 @@ public class PlotContent implements IChartPart {
} }
} }
} }
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment