From 12dbc0fca3d820bd9e14866f9f620855145133a0 Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Wed, 4 May 2016 16:49:20 -0400 Subject: [PATCH] analysis.lami: Fix timestamp label not showing on Y axis The fix is the same as the custom label since it is the same problem. Put tick angle to 1. Bug: 493941 Change-Id: I8b302a24474d47dd3c899d0e05e452cec5663cba Signed-off-by: Jonathan Rajotte Reviewed-on: https://git.eclipse.org/r/72245 Reviewed-by: Patrick Tasse Tested-by: Patrick Tasse Reviewed-by: Hudson CI Reviewed-by: Alexandre Montplaisir --- .../lami/ui/viewers/LamiScatterViewer.java | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/analysis/org.eclipse.tracecompass.analysis.lami.ui/src/org/eclipse/tracecompass/internal/provisional/analysis/lami/ui/viewers/LamiScatterViewer.java b/analysis/org.eclipse.tracecompass.analysis.lami.ui/src/org/eclipse/tracecompass/internal/provisional/analysis/lami/ui/viewers/LamiScatterViewer.java index 5f8b9ecf7a..20ba7b3b89 100644 --- a/analysis/org.eclipse.tracecompass.analysis.lami.ui/src/org/eclipse/tracecompass/internal/provisional/analysis/lami/ui/viewers/LamiScatterViewer.java +++ b/analysis/org.eclipse.tracecompass.analysis.lami.ui/src/org/eclipse/tracecompass/internal/provisional/analysis/lami/ui/viewers/LamiScatterViewer.java @@ -259,25 +259,25 @@ public class LamiScatterViewer extends LamiXYChartViewer { yTick.setFormat(new LamiLabelFormat(checkNotNull(yMap))); updateTickMark(checkNotNull(yMap), yTick, getChart().getPlotArea().getSize().y); - /* - * SWTChart workaround: SWTChart fiddles with tick mark visibility - * based on the fact that it can parse the label to double or not. - * - * If the label happens to be a double, it checks for the presence - * of that value in its own tick labels to decide if it should add - * it or not. If it happens that the parsed value is already present - * in its map, the tick gets a visibility of false. - * - * The X axis does not have this problem since SWTCHART checks on - * label angle, and if it is != 0 simply does no logic regarding - * visibility. So simply set a label angle of 1 to the axis. - */ - yTick.setTickLabelAngle(1); - /* Remove horizontal grid line */ getChart().getAxisSet().getYAxis(0).getGrid().setStyle(LineStyle.NONE); } + /* + * SWTChart workaround: SWTChart fiddles with tick mark visibility based + * on the fact that it can parse the label to double or not. + * + * If the label happens to be a double, it checks for the presence of + * that value in its own tick labels to decide if it should add it or + * not. If it happens that the parsed value is already present in its + * map, the tick gets a visibility of false. + * + * The X axis does not have this problem since SWTCHART checks on label + * angle, and if it is != 0 simply does no logic regarding visibility. + * So simply set a label angle of 1 to the axis. + */ + yTick.setTickLabelAngle(1); + setLineSeriesColor(); /* Put log scale if necessary */ -- 2.34.1