tmf.ui: make CommonXLineChartViewer hide the X axis label by default.
authorMatthew Khouzam <matthew.khouzam@ericsson.com>
Fri, 15 Apr 2016 17:06:23 +0000 (13:06 -0400)
committerMatthew Khouzam <matthew.khouzam@ericsson.com>
Mon, 18 Apr 2016 18:51:31 +0000 (14:51 -0400)
The X axis label is always "Time" for the common line chart viewer, this
patch saves some vertical space by not displaying it.

The legend is moved by default to the bottom, this saves a lot of space
due to time alignment.

Change-Id: I965290de363d2196140e03e60f3abe69fe35efb0
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/70776
Reviewed-by: Hudson CI
Reviewed-by: Genevieve Bastien <gbastien+lttng@versatic.net>
Tested-by: Genevieve Bastien <gbastien+lttng@versatic.net>
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/xycharts/linecharts/TmfCommonXLineChartViewer.java

index 6342a2b96aee23c2a82648a592fcb0f242965b04..9671165c8e08d2d663300eb63b1deabf09f3f650 100644 (file)
@@ -80,7 +80,8 @@ public abstract class TmfCommonXLineChartViewer extends TmfXYChartViewer {
      */
     public TmfCommonXLineChartViewer(Composite parent, String title, String xLabel, String yLabel) {
         super(parent, title, xLabel, yLabel);
-
+        getSwtChart().getLegend().setPosition(SWT.BOTTOM);
+        getSwtChart().getAxisSet().getXAxes()[0].getTitle().setVisible(false);
         setResolution(RESOLUTION);
         setTooltipProvider(new TmfCommonXLineChartTooltipProvider(this));
     }
This page took 0.026557 seconds and 5 git commands to generate.