use of com.cubrid.cubridmanager.core.monstatistic.model.StatisticParamUtil.ChartType in project cubrid-manager by CUBRID.
the class MonitorStatisticChart method refreshChart.
public void refreshChart(List<StatisticData> statisticDataList) {
this.statisticDataList = statisticDataList;
if (chart == null) {
return;
}
int oldDataStatus = isHasValidData ? 1 : 0;
isHasValidData = false;
ChartType oldType = chartType;
XYDataset dataset = createDataset();
XYPlot plot = chart.getXYPlot();
int newDataStatus = isHasValidData ? 1 : 0;
if (!isHasValidData) {
if (oldDataStatus != newDataStatus) {
setNoDataPlot(plot);
}
plot.setDataset(EMPTY_DATASET);
} else {
if (oldDataStatus != newDataStatus) {
setDataPlot(plot);
}
if (chartType != oldType) {
plot.getRangeAxis().setRange(rangMin, rangMax);
}
plot.setDataset(dataset);
}
}