Skip to content
Snippets Groups Projects
Commit 23ca04c9 authored by Tim Molter's avatar Tim Molter Committed by Niklas Polke
Browse files

clean up debugging bounding boxes and commented out code [ci skip] (2)

parent 89cae126
No related branches found
No related tags found
No related merge requests found
...@@ -308,7 +308,7 @@ public class XChartDemo extends JPanel implements TreeSelectionListener { ...@@ -308,7 +308,7 @@ public class XChartDemo extends JPanel implements TreeSelectionListener {
defaultMutableTreeNode = new DefaultMutableTreeNode(new ChartInfo("DateChart07 - Year Scale", new DateChart07().getChart())); defaultMutableTreeNode = new DefaultMutableTreeNode(new ChartInfo("DateChart07 - Year Scale", new DateChart07().getChart()));
category.add(defaultMutableTreeNode); category.add(defaultMutableTreeNode);
defaultMutableTreeNode = new DefaultMutableTreeNode(new ChartInfo("DateChart08 - Rotated Labels", new DateChart08().getChart())); defaultMutableTreeNode = new DefaultMutableTreeNode(new ChartInfo("DateChart08 - Rotated Tick Labels", new DateChart08().getChart()));
category.add(defaultMutableTreeNode); category.add(defaultMutableTreeNode);
// Real-time category // Real-time category
......
...@@ -49,7 +49,7 @@ public class DateChart08 implements ExampleChart { ...@@ -49,7 +49,7 @@ public class DateChart08 implements ExampleChart {
public Chart getChart() { public Chart getChart() {
// Create Chart // Create Chart
Chart chart = new ChartBuilder().width(800).height(600).title("Year Scale").build(); Chart chart = new ChartBuilder().width(800).height(600).title("Rotated Tick Labels").build();
chart.getStyleManager().setLegendVisible(false); chart.getStyleManager().setLegendVisible(false);
chart.getStyleManager().setXAxisLabelRotation(45); chart.getStyleManager().setXAxisLabelRotation(45);
......
...@@ -167,8 +167,8 @@ public class AxisTickLabels implements ChartPart { ...@@ -167,8 +167,8 @@ public class AxisTickLabels implements ChartPart {
// System.out.println("tickLabelBounds: " + tickLabelBounds.toString()); // System.out.println("tickLabelBounds: " + tickLabelBounds.toString());
double shiftX = -1 * tickLabelBounds.getX() * Math.sin(Math.toRadians(getChartPainter().getStyleManager().getXAxisLabelRotation())); double shiftX = -1 * tickLabelBounds.getX() * Math.sin(Math.toRadians(getChartPainter().getStyleManager().getXAxisLabelRotation()));
double shiftY = -1 * (tickLabelBounds.getY() + tickLabelBounds.getHeight()); double shiftY = -1 * (tickLabelBounds.getY() + tickLabelBounds.getHeight());
System.out.println(shiftX); // System.out.println(shiftX);
System.out.println("shiftY: " + shiftY); // System.out.println("shiftY: " + shiftY);
at.translate(xPos + shiftX, yOffset + shiftY); at.translate(xPos + shiftX, yOffset + shiftY);
g.transform(at); g.transform(at);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment