use of org.jfree.data.general.DefaultPieDataset in project adempiere by adempiere.
the class MChart method getPieDataset.
public PieDataset getPieDataset() {
dataset = new DefaultPieDataset();
loadData();
return (PieDataset) dataset;
}
use of org.jfree.data.general.DefaultPieDataset in project adempiere by adempiere.
the class GraphBuilder method loadData.
/**
*
* @return graph column list
*/
public ArrayList<GraphColumn> loadData() {
// Calculated
MMeasure measure = getMGoal().getMeasure();
if (measure == null) {
log.warning("No Measure for " + getMGoal());
return null;
}
ArrayList<GraphColumn> list = measure.getGraphColumnList(getMGoal());
pieDataset = new DefaultPieDataset();
dataset = new DefaultCategoryDataset();
for (int i = 0; i < list.size(); i++) {
String series = m_X_AxisLabel;
if (list.get(i).getDate() != null) {
Calendar cal = Calendar.getInstance();
cal.setTime(list.get(i).getDate());
series = Integer.toString(cal.get(Calendar.YEAR));
}
dataset.addValue(list.get(i).getValue(), series, list.get(i).getLabel());
linearDataset.addValue(list.get(i).getValue(), m_X_AxisLabel, list.get(i).getLabel());
pieDataset.setValue(list.get(i).getLabel(), list.get(i).getValue());
}
return list;
}
use of org.jfree.data.general.DefaultPieDataset in project cubrid-manager by CUBRID.
the class VolumeFolderInfoEditor method createDataset.
/**
* create the dataset
*
* @param dbSpaceInfo DbSpaceInfo
* @return dataset
*/
private DefaultPieDataset createDataset(DbSpaceInfo dbSpaceInfo) {
int freeSize = dbSpaceInfo.getFreepage();
int totalSize = dbSpaceInfo.getTotalpage();
DefaultPieDataset dataset = new DefaultPieDataset();
dataset.setValue(Messages.chartMsgUsedSize, new Double(totalSize - freeSize));
dataset.setValue(Messages.chartMsgFreeSize, new Double(freeSize));
return dataset;
}
use of org.jfree.data.general.DefaultPieDataset in project cubrid-manager by CUBRID.
the class DatabaseStatusEditor method createDataset.
/**
*
* Create the chart dataset
*
* @param dbSpaceInfo the DbSpaceInfo
* @return the dataset
*/
private DefaultPieDataset createDataset(DbSpaceInfo dbSpaceInfo) {
int freeSize = dbSpaceInfo.getFreepage();
int totalSize = dbSpaceInfo.getTotalpage();
DefaultPieDataset dataset = new DefaultPieDataset();
dataset.setValue(Messages.chartMsgUsedSize, (totalSize - freeSize) * (database.getDatabaseInfo().getDbSpaceInfoList().getPagesize() / (1048576.0f)));
dataset.setValue(Messages.chartMsgFreeSize, (freeSize) * (database.getDatabaseInfo().getDbSpaceInfoList().getPagesize() / (1048576.0f)));
return dataset;
}
Aggregations