Skip to content

Commit

Permalink
Minor & temporary formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
LKMason committed Jan 25, 2024
1 parent e374e79 commit 5d9f0dd
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
6 changes: 5 additions & 1 deletion src/utils/quantilePlots.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ export function plotQuantileScatter(container, data, options={}) {

options.yLabel = options.yLabel != null ? options.yLabel : options.valueField

//const containerWidth = container.getBoundingClientRect().width
const height = container.getBoundingClientRect().height
console.log("Height", container.getAttribute("id"), height)

const marks = []
if (options.valueFieldLow != null && options.valueFieldHigh != null) {
marks.push(Plot.link(data, {
Expand Down Expand Up @@ -81,7 +85,7 @@ export function plotQuantileScatter(container, data, options={}) {

const plotOptions = {
width: sizePerFacet * nFacets,
height: 720,
height,
style: {fontSize: "14px"},
color: colorOpt,
x: {type: "point", label: options.xLabel, tickFormat: options.xTickFormat, tickRotate: -45},
Expand Down
3 changes: 2 additions & 1 deletion static/css/epitracker.css
Original file line number Diff line number Diff line change
Expand Up @@ -2486,6 +2486,7 @@ button.previous-btn {

#plot-quantiles {
width: 100%;
height: 100%;
}

/* #maps-container {
Expand Down Expand Up @@ -2782,7 +2783,7 @@ button.previous-btn {
}

#plot-container.fill-height {
height: calc(100% - 120px); /* TODO: This is hack-y, fix */
height: calc(100% - 180px); /* TODO: This is hack-y, fix */
}

#plot-container svg {
Expand Down
10 changes: 5 additions & 5 deletions visualization/demographics.html
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,7 @@ <h4>Other</h4>

<div id="content">
<div id="topbar">
<div id="topbar-content">

<div id="display-mode-control">
<div id="display-mode-control">
<ul class="nav nav-tabs">
<li class="nav-item">
<a id="graph-nav-link" class="nav-link active"><i class="bi bi-graph-up"></i></a>
Expand All @@ -177,9 +175,11 @@ <h4>Other</h4>
<a id="table-nav-link" class="nav-link"><i class="bi bi-table"></i></a>
</li>
<ul>
</div>
</div>
<div id="download-container"></div>
<div id="topbar-cnt">
<div id="download-container"></div>
</div>

</div>
<div id="plots">
<div id="plot-title">...loading...</div>
Expand Down
2 changes: 1 addition & 1 deletion visualization/quantile.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ <h4>Other</h4>
<div id="plots">
<div id="plot-legend"></div>
<div id="plot-title"></div>
<div id="plot-container">
<div id="plot-container" class="fill-height">
<div id="plot-quantiles"></div>
</div>

Expand Down

0 comments on commit 5d9f0dd

Please sign in to comment.