Search in sources :

Example 46 with Visualization

use of org.hisp.dhis.visualization.Visualization in project dhis2-core by dhis2.

the class DhisConvenienceTest method createVisualization.

public static Visualization createVisualization(char uniqueCharacter) {
    Visualization visualization = new Visualization();
    visualization.setAutoFields();
    visualization.setName("Visualization" + uniqueCharacter);
    visualization.setType(PIVOT_TABLE);
    return visualization;
}
Also used : Visualization(org.hisp.dhis.visualization.Visualization) EventVisualization(org.hisp.dhis.eventvisualization.EventVisualization)

Example 47 with Visualization

use of org.hisp.dhis.visualization.Visualization in project dhis2-core by dhis2.

the class VisualizationController method deserializeJsonEntity.

@Override
protected Visualization deserializeJsonEntity(final HttpServletRequest request) throws IOException {
    final Visualization visualization = super.deserializeJsonEntity(request);
    addDimensionsInto(visualization);
    return visualization;
}
Also used : Visualization(org.hisp.dhis.visualization.Visualization)

Example 48 with Visualization

use of org.hisp.dhis.visualization.Visualization in project dhis2-core by dhis2.

the class VisualizationDataController method getReportTableGrid.

private Grid getReportTableGrid(String uid, String organisationUnitUid, Date date) {
    Visualization visualization = visualizationService.getVisualizationNoAcl(uid);
    if (organisationUnitUid == null && visualization.hasReportingParams() && visualization.getReportingParams().isOrganisationUnitSet()) {
        organisationUnitUid = organisationUnitService.getRootOrganisationUnits().iterator().next().getUid();
    }
    date = date != null ? date : new Date();
    return visualizationGridService.getVisualizationGrid(uid, date, organisationUnitUid);
}
Also used : Visualization(org.hisp.dhis.visualization.Visualization) Date(java.util.Date)

Aggregations

Visualization (org.hisp.dhis.visualization.Visualization)48 Test (org.junit.jupiter.api.Test)36 EventVisualization (org.hisp.dhis.eventvisualization.EventVisualization)26 DhisSpringTest (org.hisp.dhis.DhisSpringTest)17 TransactionalIntegrationTest (org.hisp.dhis.TransactionalIntegrationTest)14 User (org.hisp.dhis.user.User)13 OrganisationUnit (org.hisp.dhis.organisationunit.OrganisationUnit)8 BaseDimensionalObject (org.hisp.dhis.common.BaseDimensionalObject)7 DataElement (org.hisp.dhis.dataelement.DataElement)6 List (java.util.List)5 DataQueryParams (org.hisp.dhis.analytics.DataQueryParams)4 IdentifiableObject (org.hisp.dhis.common.IdentifiableObject)4 Period (org.hisp.dhis.period.Period)4 Date (java.util.Date)3 Dashboard (org.hisp.dhis.dashboard.Dashboard)3 DataSet (org.hisp.dhis.dataset.DataSet)3 ErrorReport (org.hisp.dhis.feedback.ErrorReport)3 UserAccess (org.hisp.dhis.user.sharing.UserAccess)3 ClassPathResource (org.springframework.core.io.ClassPathResource)3 ArrayList (java.util.ArrayList)2