Search in sources :

Example 1 with CategoryProperties

use of org.activityinfo.legacy.shared.reports.model.CategoryProperties in project activityinfo by bedatadriven.

the class ChartRendererJC method computePaints.

private Paint[] computePaints(List<PivotTableData.Axis> categories) {
    Paint[] paints = getDefaultPaints(categories.size());
    Dimension dim = categories.get(0).getDimension();
    if (dim == null) {
        return paints;
    }
    for (int i = 0; i != categories.size(); ++i) {
        CategoryProperties props = dim.getCategories().get(categories.get(i).getCategory());
        if (props != null && props.getColor() != null) {
            paints[i] = new Color(props.getColor());
        }
    }
    return paints;
}
Also used : CategoryProperties(org.activityinfo.legacy.shared.reports.model.CategoryProperties) Dimension(org.activityinfo.legacy.shared.reports.model.Dimension)

Aggregations

CategoryProperties (org.activityinfo.legacy.shared.reports.model.CategoryProperties)1 Dimension (org.activityinfo.legacy.shared.reports.model.Dimension)1