Skip to content

Commit

Permalink
Use CSS to hide numbers we do not need
Browse files Browse the repository at this point in the history
  • Loading branch information
mccalluc committed Oct 16, 2024
1 parent a6a9a57 commit 19c58c5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dp_creator_ii/app/analysis_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def analysis_ui():
"Values above 1 will add less noise to the data, "
"but have greater risk of revealing individual data."
),
ui.input_slider("log_epsilon_slider", "Slider", -1, 1, 0, step=0.1),
ui.output_text_verbatim("epsilon"),
ui.input_slider("log_epsilon_slider", None, -1, 1, 0, step=0.1),
ui.output_text("epsilon"),
ui.markdown(
"## Preview\n"
"These plots assume a normal distribution for the columns you've selected, "
Expand All @@ -45,7 +45,7 @@ def epsilon_calc():

@render.text
def epsilon():
return epsilon_calc()
return f"Epsilon: {epsilon_calc():0.3}"

@render.plot()
def plot_preview():
Expand Down
5 changes: 5 additions & 0 deletions dp_creator_ii/app/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@ body {
#top_level_nav {
margin-bottom: 1em;
}

/* Rather than engineer a new widget, hide the numbers we don't want. */
.irs-min, .irs-max, .irs-single {
display: none;
}

0 comments on commit 19c58c5

Please sign in to comment.