use of com.extjs.gxt.charts.client.model.charts.LineChart in project activityinfo by bedatadriven.
the class ChartOFCView method addLineSeries.
private void addLineSeries(ChartModel cm, List<PivotTableData.Axis> categories, List<PivotTableData.Axis> series) {
int index = 0;
for (PivotTableData.Axis s : series) {
String color = Theme.getAccent(index++);
LineChart lineChart = new LineChart();
lineChart.setTooltip("#x_label#<br>#val#");
lineChart.setColour(color);
lineChart.setDotStyle(new SolidDot());
for (PivotTableData.Axis category : categories) {
PivotTableData.Cell cell = category.getCell(s);
double value = cell == null ? 0 : cell.getValue();
BaseDot d = new Dot(5);
d.setSize(5);
d.setColour(color);
d.setTooltip(formatTooltip(s, category, value));
d.setValue(value);
lineChart.addDots(d);
}
cm.addChartConfig(lineChart);
}
}
Aggregations