aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'profiling/org.eclipse.linuxtools.dataviewers.piechart/src/org/eclipse/linuxtools/dataviewers/piechart/PieChart.java')
-rw-r--r--profiling/org.eclipse.linuxtools.dataviewers.piechart/src/org/eclipse/linuxtools/dataviewers/piechart/PieChart.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/profiling/org.eclipse.linuxtools.dataviewers.piechart/src/org/eclipse/linuxtools/dataviewers/piechart/PieChart.java b/profiling/org.eclipse.linuxtools.dataviewers.piechart/src/org/eclipse/linuxtools/dataviewers/piechart/PieChart.java
index d9a3a6232a..adabc5fa73 100644
--- a/profiling/org.eclipse.linuxtools.dataviewers.piechart/src/org/eclipse/linuxtools/dataviewers/piechart/PieChart.java
+++ b/profiling/org.eclipse.linuxtools.dataviewers.piechart/src/org/eclipse/linuxtools/dataviewers/piechart/PieChart.java
@@ -27,6 +27,10 @@ public class PieChart extends Chart {
protected List<RGB> colorList = new ArrayList<RGB>();
public PieChart(Composite parent, int style) {
+ this(parent, style, new String[0]);
+ }
+
+ public PieChart(Composite parent, int style, String labels[]) {
super(parent, style);
Control plotArea = null;
for (Control child : getChildren()) {
@@ -37,7 +41,7 @@ public class PieChart extends Chart {
plotArea = child;
}
}
- this.addPaintListener(new PieChartPaintListener(this, plotArea));
+ this.addPaintListener(new PieChartPaintListener(this, plotArea, labels));
}
@Override
@@ -50,6 +54,7 @@ public class PieChart extends Chart {
/*
* Add data to this Pie Chart. A single pie Chart will be drawn with the data provided.
*/
+ @Deprecated
public void addPieChartSeries(String labels[], double val[]) {
for (ISeries s : this.getSeriesSet().getSeries()) {
this.getSeriesSet().deleteSeries(s.getId());