Explorar o código

update value to bounded variable

namnguyen hai 11 meses
pai
achega
d8d7af0c3c

+ 2 - 1
doc/gui/examples/controls/metric-layout.py

@@ -17,6 +17,7 @@ from taipy.gui import Gui
 
 # Layout reference can be found in the documentation: https://plotly.com/python/reference/layout/
 
+value = 50
 layout = {
     "width": "1000",
     "height": "500",
@@ -35,7 +36,7 @@ layout = {
 }
 
 page = """
-<|30|metric|layout={layout}|>
+<|{value}|metric|layout={layout}|>
 """
 
 Gui(page).run()

+ 2 - 1
doc/gui/examples/controls/metric-range.py

@@ -15,11 +15,12 @@
 # -----------------------------------------------------------------------------------------
 from taipy.gui import Gui
 
+value = 50
 min_value = 50
 max_value = 150
 
 page = """
-<|90|metric|min={min_value}|max={max_value}|>
+<|{value}|metric|min={min_value}|max={max_value}|>
 """
 
 

+ 4 - 2
doc/gui/examples/controls/metric-type.py

@@ -15,9 +15,11 @@
 # -----------------------------------------------------------------------------------------
 from taipy.gui import Gui
 
+value = 50
+
 page = """
-<|50|metric|type=linear|>
-<|50|metric|type=circular|>
+<|{value}|metric|type=linear|>
+<|{value}|metric|type=circular|>
 """
 
 Gui(page).run()

+ 1 - 1
doc/gui/examples/controls/metric-value-format.py

@@ -22,7 +22,7 @@ delta_value = 20
 # They use the printf syntax.
 
 page = """
-<|{value}|metric|delta={delta_value}|format=%d km/h|delta_format=%dkm/h|>
+<|{value}|metric|delta={delta_value}|format=%d km/h|delta_format=%d km/h|>
 """