From 77aec3c202fc0d649c0f5ffa91ea29c034e2b859 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Wed, 22 Jan 2020 18:13:34 +0100 Subject: [PATCH] Refactored charts. Finished created/closed charts. --- .../pages/CreatedConcludedCountChartView.java | 4 +- .../agirstatool/core/pages/ProjectPage.java | 9 +- .../agirstatool/core/pages/agirstatool.css | 42 +++++++--- .../agirstatool/core/pages/chartBarView.xhtml | 2 +- .../core/pages/chartLineView.xhtml | 2 +- .../core/pages/chartPolarView.xhtml | 2 +- .../agirstatool/core/pages/project.xhtml | 84 +++++++++++++++++-- 7 files changed, 115 insertions(+), 30 deletions(-) diff --git a/src/org/april/agirstatool/core/pages/CreatedConcludedCountChartView.java b/src/org/april/agirstatool/core/pages/CreatedConcludedCountChartView.java index 9feceb1..76a4791 100644 --- a/src/org/april/agirstatool/core/pages/CreatedConcludedCountChartView.java +++ b/src/org/april/agirstatool/core/pages/CreatedConcludedCountChartView.java @@ -158,7 +158,7 @@ public class CreatedConcludedCountChartView * @throws AgirStatoolException * the agir statool exception */ - public static String buildLastMonth(final String title, final Project project, final int monthCount) throws AgirStatoolException + public static String buildLastMonths(final String title, final Project project, final int monthCount) throws AgirStatoolException { String result; @@ -176,7 +176,7 @@ public class CreatedConcludedCountChartView * @return * @throws AgirStatoolException */ - public static String buildLastYear(final String title, final Project project) throws AgirStatoolException + public static String buildPreviousYear(final String title, final Project project) throws AgirStatoolException { String result; diff --git a/src/org/april/agirstatool/core/pages/ProjectPage.java b/src/org/april/agirstatool/core/pages/ProjectPage.java index 9305f4b..811af99 100644 --- a/src/org/april/agirstatool/core/pages/ProjectPage.java +++ b/src/org/april/agirstatool/core/pages/ProjectPage.java @@ -58,14 +58,17 @@ public class ProjectPage data.setContent("agirLink", project.getName()); data.setAttribute("agirLink", "href", "https://agir.april.org/projects/" + project.getIdentifier() + "/issues"); - data.setContent("issueCreatedClosed3MonthsChart", CreatedConcludedCountChartView.buildLastYear("Created/closed last year Count", project)); - data.setContent("issueCreatedClosed6MonthsChart", CreatedConcludedCountChartView.buildLastMonth("Created/closed 6 months Count", project, 6)); - data.setContent("issueCreatedClosedChart", CreatedConcludedCountChartView.buildFull("Created/closed Count", project)); + data.setContent("issueCreatedClosed3MonthsChart", CreatedConcludedCountChartView.buildLastMonths("Created/closed 3 months Count", project, 3)); + data.setContent("issueCreatedClosed6MonthsChart", CreatedConcludedCountChartView.buildLastMonths("Created/closed 6 months Count", project, 6)); + data.setContent("issueCreatedClosedPreviousYearChart", CreatedConcludedCountChartView.buildPreviousYear("Created/closed last year Count", project)); + data.setContent("issueCreatedClosedFullChart", CreatedConcludedCountChartView.buildFull("Created/closed Count", project)); data.setContent("issueRawChart", IssueStatChartView.build("Issue Raw Count", project)); data.setContent("issueGroupedChart", IssueStatChartView.buildGrouped("Issue Grouped Count", project)); data.setContent("unassignedRawChart", UnassignedPolarChartView.build("Unassigned Raw Count", project)); data.setContent("unassignedGroupedChart", UnassignedPolarChartView.buildGrouped("Unassigned Grouped Count", project)); + data.setContent("issueCreatedClosed6MonthsChartA", CreatedConcludedCountChartView.buildLastMonths("Created/closed 6 months CountA", project, 6)); + data.setContent("issueCreatedClosed6MonthsChartB", CreatedConcludedCountChartView.buildLastMonths("Created/closed 6 months CountB", project, 6)); String projectsRawView = ProjectsRawView.build(project); data.setContent("projectsRawView", projectsRawView); diff --git a/src/org/april/agirstatool/core/pages/agirstatool.css b/src/org/april/agirstatool/core/pages/agirstatool.css index 04bd8d4..8c29e0d 100644 --- a/src/org/april/agirstatool/core/pages/agirstatool.css +++ b/src/org/april/agirstatool/core/pages/agirstatool.css @@ -229,25 +229,41 @@ h3 span /***** GENERIC BUTTONS *****/ /*******/ - -a.button +.button { - background-color: #2E2D30; - color: #FDCA59; - text-decoration: none; - text-transform: uppercase; - margin-top:15px; - margin-bottom:15px; - padding:10px; - display:inline-block; - font-family: ITCAvantGardeStd-Md, Arial, Helvetica, sans-serif; + background-color: #e7e7e7; + border: none; + color: black; + padding: 4px 15px; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 16px; + width: 110px; } -a.button:hover +.button:hover { - background-color:#5f5d63; + font-weight: bold; } +.unselected +{ + background-color: #e7e7e7; + color: black; +} + +.selected +{ + background-color: #008CBA; + color: white; +} + + +/******/ + + + /* The switch - the box around the slider */ .switch { diff --git a/src/org/april/agirstatool/core/pages/chartBarView.xhtml b/src/org/april/agirstatool/core/pages/chartBarView.xhtml index ffd86e2..48929c2 100644 --- a/src/org/april/agirstatool/core/pages/chartBarView.xhtml +++ b/src/org/april/agirstatool/core/pages/chartBarView.xhtml @@ -11,7 +11,7 @@ -
+
-
+
-
+