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

fixed axis title visibility bug

parent 3bf1c6ef
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,6 @@ public class ErrorBarTest {
double[] yData3 = new double[] { 150, 120, 110, 100, 90, 70, 60 };
Chart mychart = new Chart(900, 700);
// mychart.getStyleManager().setYAxisLogarithmic(true); // set log or linear Y axis
mychart.getStyleManager().setYAxisMin(0);
mychart.getStyleManager().setYAxisMax(150);
mychart.getStyleManager().setErrorBarsColor(Color.black);
......
......@@ -219,11 +219,6 @@ public class Chart {
*/
public void setYAxisTitle(String title) {
if (title == null || title.trim().equalsIgnoreCase("")) {
chartPainter.getStyleManager().setYAxisTitleVisible(false);
} else {
chartPainter.getStyleManager().setYAxisTitleVisible(true);
}
chartPainter.getAxisPair().getyAxis().getAxisTitle().setText(title);
}
......
......@@ -515,7 +515,6 @@ public class StyleManager {
this.xAxisTitleVisible = isVisible;
this.yAxisTitleVisible = isVisible;
}
/**
......
......@@ -60,6 +60,7 @@ public class AxisTitle implements ChartPart {
g.setFont(getChartPainter().getStyleManager().getAxisTitleFont());
if (axis.getDirection() == Axis.Direction.Y) {
if (text != null && !text.trim().equalsIgnoreCase("") && getChartPainter().getStyleManager().isYAxisTitleVisible()) {
FontRenderContext frc = g.getFontRenderContext();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment