GSMEthesis commited on
Commit
373aad3
·
verified ·
1 Parent(s): a0eca4b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py CHANGED
@@ -771,6 +771,21 @@ def create_likert_question(question, key, scale_type="5point"):
771
  """,
772
  unsafe_allow_html=True
773
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
774
 
775
  return value
776
 
 
771
  """,
772
  unsafe_allow_html=True
773
  )
774
+ st.components.v1.html(f"""
775
+ <script>
776
+ (function() {{
777
+ const slider = parent.document.querySelector('[data-testid="stSlider"] [aria-valuenow="{value}"]');
778
+ if(slider) {{
779
+ slider.parentElement.style.background = `repeating-linear-gradient(
780
+ to right,
781
+ #6a0dad, #6a0dad 2px,
782
+ transparent 2px, transparent calc(100%/{max_value-1} - 1px),
783
+ #6a0dad calc(100%/{max_value-1}), #6a0dad calc(100%/{max_value-1} + 1px)
784
+ )`;
785
+ }}
786
+ }})();
787
+ </script>
788
+ """, height=0)
789
 
790
  return value
791