Change-Id: Ie6cea17dea1490af724adec1d0743d01cad884f6
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/83251
Reviewed-by: Hudson CI
Reviewed-by: Genevieve Bastien <gbastien+lttng@versatic.net>
Tested-by: Genevieve Bastien <gbastien+lttng@versatic.net>
* The array of values for the series
*/
protected void setSeries(String seriesName, double[] seriesValues) {
* The array of values for the series
*/
protected void setSeries(String seriesName, double[] seriesValues) {
- if (fXValues.length > seriesValues.length) {
- throw new IllegalStateException();
+ if (fXValues.length != seriesValues.length) {
+ throw new IllegalStateException("All series in list must be of length : " + fXValues.length); //$NON-NLS-1$
}
fSeriesValues.put(seriesName, seriesValues);
}
}
fSeriesValues.put(seriesName, seriesValues);
}
IAxisTick xTick = getSwtChart().getAxisSet().getXAxis(0).getTick();
xTick.setFormat(tmfChartTimeStampFormat);
IAxisTick xTick = getSwtChart().getAxisSet().getXAxis(0).getTick();
xTick.setFormat(tmfChartTimeStampFormat);
- final double start = xValues[0];
- int lastX = xValues.length - 1;
- double end = (start == xValues[lastX]) ? start + 1 : xValues[lastX];
+ final double start = 0.0;
+ double end = getWindowEndTime() - getWindowStartTime();
getSwtChart().getAxisSet().getXAxis(0).setRange(new Range(start, end));
if (maxy > miny) {
getSwtChart().getAxisSet().getYAxis(0).setRange(new Range(miny, maxy));
getSwtChart().getAxisSet().getXAxis(0).setRange(new Range(start, end));
if (maxy > miny) {
getSwtChart().getAxisSet().getYAxis(0).setRange(new Range(miny, maxy));