blob: 31134f9ff4d0fdf84d2a5ad49043b5569a55a4d8 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2020 VMware
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License 2.0 which
* accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
package org.eclipse.tracecompass.incubator.internal.scripting.ui.views.histogram;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.tracecompass.tmf.core.presentation.IYAppearance;
import org.eclipse.tracecompass.tmf.ui.viewers.xycharts.linecharts.TmfFilteredXYChartViewer;
import org.eclipse.tracecompass.tmf.ui.viewers.xycharts.linecharts.TmfXYChartSettings;
/**
* Viewer for the {@link ScriptedHistogramView}
*
* @author Qing Chi
*/
public class ScriptedHistogramViewer extends TmfFilteredXYChartViewer {
private static final int DEFAULT_SERIES_WIDTH = 1;
public ScriptedHistogramViewer(Composite parent, TmfXYChartSettings settings, String providerId) {
super(parent, settings, providerId);
}
@Override
public IYAppearance getSeriesAppearance(@NonNull String seriesName) {
return getPresentationProvider().getAppearance(seriesName, IYAppearance.Type.BAR, DEFAULT_SERIES_WIDTH);
}
}