[Rt-commit] rt branch, 4.6/chart-pages-styling, created. rt-4.4.4-769-gc8cc9f78a

Michel Rodriguez michel at bestpractical.com
Thu Feb 13 16:48:09 EST 2020


The branch, 4.6/chart-pages-styling has been created
        at  c8cc9f78a2a93b4915786d210112286ef25383bf (commit)

- Log -----------------------------------------------------------------
commit e3ddbf40d4807ee176e2c2991aa6567074c8c250
Author: michel <michel at bestpractical.com>
Date:   Thu Feb 13 19:37:01 2020 +0100

    Increase the size of the Width and Height input fields.

diff --git a/share/static/css/elevator-light/charts.css b/share/static/css/elevator-light/charts.css
index d2e9b1ee1..6940b8a52 100644
--- a/share/static/css/elevator-light/charts.css
+++ b/share/static/css/elevator-light/charts.css
@@ -12,7 +12,7 @@
 
 .chart-picture input[name=Width],
 .chart-picture input[name=Height] {
-    width: 3em;
+    width: 4em;
     text-align: right;
 }
 

commit 2bfba4538685a4388a834f4d13f9a08a3b5ebd13
Author: michel <michel at bestpractical.com>
Date:   Thu Feb 13 21:27:42 2020 +0100

    Move the data table in charts lower, aligned with the chart.

diff --git a/share/html/Search/Elements/Chart b/share/html/Search/Elements/Chart
index 862765d18..50c440523 100644
--- a/share/html/Search/Elements/Chart
+++ b/share/html/Search/Elements/Chart
@@ -91,7 +91,7 @@ if ( RT->Config->Get('EnableJSChart') || !RT->Config->Get('DisableGD') ) {
           </div>
 % }
         </div>
-        <div class="col-auto">
+        <div class="col-auto chart-table-wrapper">
 % if ( ($ChartStyle || '') =~ /\btable\b/ ) {
           <& ChartTable, %ARGS, Table => { $report->FormatTable( %columns ) } &>
 % }
diff --git a/share/static/css/elevator-light/charts.css b/share/static/css/elevator-light/charts.css
index 6940b8a52..1598e6d02 100644
--- a/share/static/css/elevator-light/charts.css
+++ b/share/static/css/elevator-light/charts.css
@@ -30,3 +30,8 @@
 .cascade-by-optgroup {
     margin-right: 5px;
 }
+
+.chart-table-wrapper {
+    margin-top:auto;
+    margin-left: 15px;
+}

commit c8cc9f78a2a93b4915786d210112286ef25383bf
Author: michel <michel at bestpractical.com>
Date:   Thu Feb 13 22:39:25 2020 +0100

    Move the data table up for bar/line charts.
    
    The table should be higher for bar/line charts, but not for
    pie charts and when there is no chart.
    
    Adding the chart type as an attribute of the table wrapper allows
    for CSS rules to format the table differently based on the type.

diff --git a/share/html/Search/Elements/Chart b/share/html/Search/Elements/Chart
index 50c440523..216f522b6 100644
--- a/share/html/Search/Elements/Chart
+++ b/share/html/Search/Elements/Chart
@@ -73,14 +73,16 @@ if ( RT->Config->Get('EnableJSChart') || !RT->Config->Get('DisableGD') ) {
     $session{'i'}++;
 }
 
+my( $chart_type ) = ($ChartStyle || '') =~ /\b(pie|bar|line)\b/;
+
 </%init>
 <div class="chart-wrapper">
   <div class="form-row">
     <div class="col-auto mx-auto">
       <div class="form-row">
         <div class="col-auto">
-% if ( ($ChartStyle || '') =~ /\b(pie|bar|line)\b/ ) {
-          <div class="chart image <% $1 %> w-auto">
+% if ( $chart_type ) {
+          <div class="chart image <% $chart_type %> w-auto">
 % if ( RT->Config->Get('EnableJSChart', $session{CurrentUser}) ) {
             <& /Search/JSChart, Cache => $key, %ARGS, GroupBy => \@GroupBy &>
 % } elsif (RT->Config->Get('DisableGD')) {
@@ -91,7 +93,7 @@ if ( RT->Config->Get('EnableJSChart') || !RT->Config->Get('DisableGD') ) {
           </div>
 % }
         </div>
-        <div class="col-auto chart-table-wrapper">
+        <div class="col-auto chart-table-wrapper <%  $chart_type %>">
 % if ( ($ChartStyle || '') =~ /\btable\b/ ) {
           <& ChartTable, %ARGS, Table => { $report->FormatTable( %columns ) } &>
 % }
diff --git a/share/static/css/elevator-light/charts.css b/share/static/css/elevator-light/charts.css
index 1598e6d02..3ba2bcd94 100644
--- a/share/static/css/elevator-light/charts.css
+++ b/share/static/css/elevator-light/charts.css
@@ -35,3 +35,8 @@
     margin-top:auto;
     margin-left: 15px;
 }
+
+.chart-table-wrapper.line,
+.chart-table-wrapper.bar {
+    padding-bottom: 3em;
+}

-----------------------------------------------------------------------


More information about the rt-commit mailing list