* @return the mobily chart
* @throws ChartSettingsNotValidException
* the chart settings not valid exception
*/
private static ODBChart constructLiveChart(DataSourceConfiguration dsConfig, ArrayList<TimeSeriesDataVO> dataList, ChartType chartType) throws ChartSettingsNotValidException {
AxisInfo dataSourceAxisInfo = null;
ODBChart liveChart = null;
Integer min, max, minIndex, maxIndex;
try {
for (AxisInfo dsai : dsConfig.getXsInfo()) {
if ("Y".equals(dsai.getDataSourceAxisType())) {
dataSourceAxisInfo = dsai;
}
}
ArrayList<String> axisLabels = dataSourceAxisInfo.getAxisLabels();
min = Integer.parseInt(axisLabels.get(0));
max = Integer.parseInt(axisLabels.get(axisLabels.size() - 1));
} catch (Exception e) {
throw new ChartSettingsNotValidException("The data Source Axis Setting is not valied for Live Chart, please contact your admin");
}