Skip to content

Commit

Permalink
Better mobile buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
tunetheweb committed Dec 2, 2024
1 parent 97f4be0 commit 4bdcce3
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/js/histogram.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ function drawChart(series, containerId, options) {
weight: 'normal',
},
padding: {
bottom: 70,
bottom: 80,
},
},
tooltip: {
Expand Down
2 changes: 1 addition & 1 deletion src/js/timeseries.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ async function drawChart(options, series) {
weight: 'normal',
},
padding: {
bottom: 60,
bottom: 80,
},
},
tooltip: {
Expand Down
11 changes: 9 additions & 2 deletions static/css/report.css
Original file line number Diff line number Diff line change
Expand Up @@ -193,25 +193,32 @@ th {

.chart-buttons {
display: flex;
gap: 5px;
justify-content: space-between;
padding: 10px;
position: relative;
margin-top: -40px;
top: 100px;
top: 120px;
font-size: 0.8rem;
}

.chart-buttons button {
border: none;
}

.zoom-buttoms {
.zoom-buttons,
.other-buttons {
display: flex;
flex-wrap: wrap;
align-content: flex-start;
justify-content: space-around;
}

.other-buttons div {
display: flex;
gap: 5px;
}

.chart {
min-width: 310px;
margin: 0 auto;
Expand Down
10 changes: 6 additions & 4 deletions templates/report/histogram.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@
<div class="chart">
<div id="{{ metric.id }}-chart-buttons" class="chart-buttons hidden">
<!-- Zoom buttons -->
<div id="{{ metric.id }}-zoom-buttons">
<div id="{{ metric.id }}-zoom-buttons" class="zoom-buttons">
</div>
<!-- Export and query buttons -->
<div id="{{ metric.id }}-other-buttons">
<button id="{{ metric.id }}-chart-download-png">Download PNG</button>
<button id="{{ metric.id }}-chart-show-query">Show query</button>
<div id="{{ metric.id }}-other-buttons" class="other-buttons">
<div>
<button id="{{ metric.id }}-chart-download-png">Download PNG</button>
<button id="{{ metric.id }}-chart-show-query">Show query</button>
</div>
</div>
</div>
<canvas id="{{ metric.id }}-chart" role="img" aria-label="Chart of {{ metric.name }}" aria-describedby="{{ metric.id }}-table">
Expand Down
2 changes: 1 addition & 1 deletion templates/report/timeseries.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</div>
</div>
<!-- Export and query buttons -->
<div id="{{ metric.id }}-other-buttons">
<div id="{{ metric.id }}-other-buttons" class="other-buttons">
<div>
<button id="{{ metric.id }}-chart-download-png">Download PNG</button>
<button id="{{ metric.id }}-chart-show-query">Show query</button>
Expand Down

0 comments on commit 4bdcce3

Please sign in to comment.