public class Chart extends org.eclipse.swt.widgets.Dialog
Modifier and Type | Field and Description |
---|---|
protected hdf.view.Chart.ChartCanvas |
chartP
Panel that draws plot of data values.
|
protected double[][] |
data
the data values of line points or histogram
|
static int |
HISTOGRAM
histogram style chart
|
static int[] |
LINE_COLORS
The default colors of lines for selected columns
|
static int |
LINEPLOT
line style chart
|
protected int |
numberOfPoints
number of data points
|
Constructor and Description |
---|
Chart(org.eclipse.swt.widgets.Shell parent,
String title,
int style,
double[][] data,
double[] xData,
double[] yRange)
Constructs a new ChartView given data and data ranges.
|
Modifier and Type | Method and Description |
---|---|
void |
open() |
void |
setLineColors(int[] c)
Sets the color of each line of a line plot
|
void |
setLineLabels(String[] l)
Sets the labels of each line.
|
void |
setTypeToInteger()
Sets the data type of the plot data to be integer.
|
public static final int HISTOGRAM
public static final int LINEPLOT
public static final int[] LINE_COLORS
protected double[][] data
protected hdf.view.Chart.ChartCanvas chartP
protected int numberOfPoints
public Chart(org.eclipse.swt.widgets.Shell parent, String title, int style, double[][] data, double[] xData, double[] yRange)
parent
- the parent of this dialog.title
- the title of this dialog.style
- the style of the chart. Valid values are: HISTOGRAM and LINEdata
- the two dimensional data array: data[linenumber][datapoints]xData
- the range of the X values, xRange[0]=xmin, xRange[1]=xmax.yRange
- the range of the Y values, yRange[0]=ymin, yRange[1]=ymax.public void open()
public void setLineColors(int[] c)
c
- the list of colorspublic void setLineLabels(String[] l)
l
- the list of line labelspublic void setTypeToInteger()
Copyright © 2018. All Rights Reserved.