瀏覽代碼

Added code examples for the dialog element (#1905)

* Added code examples for the dialog block
* Code examples renamed to use _ instead of -
Fabien Lelaquais 7 月之前
父節點
當前提交
930d1eeb68
共有 100 個文件被更改,包括 310 次插入5 次删除
  1. 1 0
      doc/gui/examples/binding_lov_is_enum/__init__.py
  2. 46 0
      doc/gui/examples/binding_lov_is_enum/builder.py
  3. 41 0
      doc/gui/examples/binding_lov_is_enum/markdown.py
  4. 1 0
      doc/gui/examples/blocks/dialog_labels/__init__.py
  5. 39 0
      doc/gui/examples/blocks/dialog_labels/builder.py
  6. 40 0
      doc/gui/examples/blocks/dialog_labels/markdown.py
  7. 1 0
      doc/gui/examples/blocks/dialog_show_hide/__init__.py
  8. 37 0
      doc/gui/examples/blocks/dialog_show_hide/builder.py
  9. 43 0
      doc/gui/examples/blocks/dialog_show_hide/markdown.py
  10. 31 0
      doc/gui/examples/builder_lambda_property.py
  11. 0 0
      doc/gui/examples/charts/advanced_selection.py
  12. 1 1
      doc/gui/examples/charts/advanced_shapes.py
  13. 0 0
      doc/gui/examples/charts/advanced_unbalanced_datasets.py
  14. 0 0
      doc/gui/examples/charts/bar_facing.py
  15. 0 0
      doc/gui/examples/charts/bar_multiple.py
  16. 0 0
      doc/gui/examples/charts/bar_simple.py
  17. 0 0
      doc/gui/examples/charts/bar_stacked.py
  18. 0 0
      doc/gui/examples/charts/basics_multiple.py
  19. 0 0
      doc/gui/examples/charts/basics_simple.py
  20. 0 0
      doc/gui/examples/charts/basics_timeline.py
  21. 0 0
      doc/gui/examples/charts/basics_title.py
  22. 0 0
      doc/gui/examples/charts/basics_two_y_axis.py
  23. 0 0
      doc/gui/examples/charts/basics_xrange.py
  24. 0 0
      doc/gui/examples/charts/bubble_hover.py
  25. 0 0
      doc/gui/examples/charts/bubble_simple.py
  26. 0 0
      doc/gui/examples/charts/bubble_symbols.py
  27. 0 0
      doc/gui/examples/charts/candlestick_simple.py
  28. 0 0
      doc/gui/examples/charts/candlestick_styling.py
  29. 0 0
      doc/gui/examples/charts/candlestick_timeseries.py
  30. 0 0
      doc/gui/examples/charts/continuous_error_multiple.py
  31. 0 0
      doc/gui/examples/charts/continuous_error_simple.py
  32. 0 0
      doc/gui/examples/charts/error_bars_asymmetric.py
  33. 0 0
      doc/gui/examples/charts/error_bars_simple.py
  34. 0 0
      doc/gui/examples/charts/example_rebuild.py
  35. 0 0
      doc/gui/examples/charts/filled_area_normalized.py
  36. 0 0
      doc/gui/examples/charts/filled_area_overlay.py
  37. 0 0
      doc/gui/examples/charts/filled_area_simple.py
  38. 0 0
      doc/gui/examples/charts/filled_area_stacked.py
  39. 0 0
      doc/gui/examples/charts/funnel_area.py
  40. 0 0
      doc/gui/examples/charts/funnel_area_multiple.py
  41. 0 0
      doc/gui/examples/charts/funnel_multiple.py
  42. 0 0
      doc/gui/examples/charts/funnel_simple.py
  43. 0 0
      doc/gui/examples/charts/funnel_styling.py
  44. 0 0
      doc/gui/examples/charts/gantt_simple.py
  45. 0 0
      doc/gui/examples/charts/heatmap_annotated.py
  46. 0 0
      doc/gui/examples/charts/heatmap_colorscale.py
  47. 0 0
      doc/gui/examples/charts/heatmap_drawing_on_top.py
  48. 1 1
      doc/gui/examples/charts/heatmap_simple.py
  49. 0 0
      doc/gui/examples/charts/heatmap_unbalanced.py
  50. 1 1
      doc/gui/examples/charts/heatmap_unequal_cell_sizes.py
  51. 0 0
      doc/gui/examples/charts/histogram_binning_function.py
  52. 0 0
      doc/gui/examples/charts/histogram_cumulative.py
  53. 0 0
      doc/gui/examples/charts/histogram_horizontal.py
  54. 0 0
      doc/gui/examples/charts/histogram_nbins.py
  55. 0 0
      doc/gui/examples/charts/histogram_normalized.py
  56. 0 0
      doc/gui/examples/charts/histogram_overlay.py
  57. 0 0
      doc/gui/examples/charts/histogram_simple.py
  58. 0 0
      doc/gui/examples/charts/histogram_stacked.py
  59. 0 0
      doc/gui/examples/charts/line_style.py
  60. 0 0
      doc/gui/examples/charts/line_texts.py
  61. 0 0
      doc/gui/examples/charts/map_bubbles.py
  62. 0 0
      doc/gui/examples/charts/map_lines.py
  63. 0 0
      doc/gui/examples/charts/map_simple.py
  64. 0 0
      doc/gui/examples/charts/pie_multiple.py
  65. 0 0
      doc/gui/examples/charts/pie_simple.py
  66. 1 1
      doc/gui/examples/charts/pie_styling.py
  67. 0 0
      doc/gui/examples/charts/polar_angular_axis.py
  68. 0 0
      doc/gui/examples/charts/polar_area.py
  69. 0 0
      doc/gui/examples/charts/polar_multiple.py
  70. 0 0
      doc/gui/examples/charts/polar_sectors.py
  71. 0 0
      doc/gui/examples/charts/polar_simple.py
  72. 0 0
      doc/gui/examples/charts/polar_tick_texts.py
  73. 0 0
      doc/gui/examples/charts/radar_multiple.py
  74. 0 0
      doc/gui/examples/charts/radar_simple.py
  75. 0 0
      doc/gui/examples/charts/scatter_classification.py
  76. 0 0
      doc/gui/examples/charts/scatter_more_styling.py
  77. 0 0
      doc/gui/examples/charts/scatter_regression.py
  78. 0 0
      doc/gui/examples/charts/scatter_styling.py
  79. 0 0
      doc/gui/examples/charts/treemap_hierarchical.py
  80. 0 0
      doc/gui/examples/charts/treemap_hierarchical_values.py
  81. 0 0
      doc/gui/examples/charts/treemap_simple.py
  82. 0 0
      doc/gui/examples/charts/waterfall_period_levels.py
  83. 0 0
      doc/gui/examples/charts/waterfall_simple.py
  84. 0 0
      doc/gui/examples/charts/waterfall_styling.py
  85. 0 0
      doc/gui/examples/controls/chat_calculator.py
  86. 0 0
      doc/gui/examples/controls/chat_discuss.py
  87. 0 0
      doc/gui/examples/controls/file_download_dynamic.py
  88. 1 1
      doc/gui/examples/controls/file_download_dynamic_temp_file.py
  89. 0 0
      doc/gui/examples/controls/metric_color_map.py
  90. 0 0
      doc/gui/examples/controls/metric_delta_color.py
  91. 0 0
      doc/gui/examples/controls/metric_formats.py
  92. 0 0
      doc/gui/examples/controls/metric_hide_value.py
  93. 0 0
      doc/gui/examples/controls/metric_layout.py
  94. 0 0
      doc/gui/examples/controls/metric_range.py
  95. 0 0
      doc/gui/examples/controls/metric_simple.py
  96. 0 0
      doc/gui/examples/controls/metric_type.py
  97. 0 0
      doc/gui/examples/controls/number_min_max.py
  98. 25 0
      doc/gui/examples/controls/number_simple.py
  99. 0 0
      doc/gui/examples/controls/number_step.py
  100. 0 0
      doc/gui/examples/controls/progress_linear.py

+ 1 - 0
doc/gui/examples/binding_lov_is_enum/__init__.py

@@ -0,0 +1 @@
+# This file makes this directory a module on its own, mandatory for mypy.

+ 46 - 0
doc/gui/examples/binding_lov_is_enum/builder.py

@@ -0,0 +1,46 @@
+# Copyright 2021-2024 Avaiga Private Limited
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations under the License.
+# -----------------------------------------------------------------------------------------
+# To execute this script, make sure that the taipy-gui package is installed in your
+# Python environment and run:
+#     python <script>
+# -----------------------------------------------------------------------------------------
+from enum import Enum
+
+import taipy.gui.builder as tgb
+from taipy.gui import Gui
+
+
+# Color values are enumerated
+class Color(Enum):
+    RED = 0
+    GREEN = 1
+    BLUE = 2
+
+
+# Initial selected color
+# Note that [color] is an enumeration member and [color_value] in a member value
+color = Color.RED
+color_value = color.value
+
+
+with tgb.Page() as page:
+    tgb.html("h2", "Using enumeration member:")
+    tgb.toggle("{color}", lov="{Color}")
+    tgb.text("{str(color)}")
+
+    tgb.html("h2", "Using enumeration value:")
+    tgb.toggle("{color_value}", lov=Color)
+    tgb.text("{color_value}")
+
+
+if __name__ == "__main__":
+    Gui(page).run(title="Binding - LoV as Enum")

+ 41 - 0
doc/gui/examples/binding_lov_is_enum/markdown.py

@@ -0,0 +1,41 @@
+# Copyright 2021-2024 Avaiga Private Limited
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations under the License.
+# -----------------------------------------------------------------------------------------
+# To execute this script, make sure that the taipy-gui package is installed in your
+# Python environment and run:
+#     python <script>
+# -----------------------------------------------------------------------------------------
+from enum import Enum
+
+from taipy.gui import Gui
+
+
+# Color values are enumerated
+class Color(Enum):
+    RED = 0
+    GREEN = 1
+    BLUE = 2
+
+
+# Initial selected color
+# Note that [color] is an enumeration member
+color = Color.RED
+
+page = """
+<|{color}|toggle|lov={Color}|>
+
+Selected enum: <|{str(color)}|>
+
+Selected value: <|{color.value}|>
+"""
+
+if __name__ == "__main__":
+    Gui(page).run(title="Binding - LoV as Enum")

+ 1 - 0
doc/gui/examples/blocks/dialog_labels/__init__.py

@@ -0,0 +1 @@
+# This file makes this directory a module on its own, mandatory for mypy.

+ 39 - 0
doc/gui/examples/blocks/dialog_labels/builder.py

@@ -0,0 +1,39 @@
+# Copyright 2021-2024 Avaiga Private Limited
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations under the License.
+# -----------------------------------------------------------------------------------------
+# To execute this script, make sure that the taipy-gui package is installed in your
+# Python environment and run:
+#     python <script>
+# -----------------------------------------------------------------------------------------
+import taipy.gui.builder as tgb
+from taipy.gui import Gui
+
+show_dialog = False
+
+
+def dialog_action(state, _, payload):
+    if payload["args"][0] == 0:  # First button
+        print("Good to hear!")  # noqa: T201
+    elif payload["args"][0] == 1:  # Second button
+        print("Sorry to hear that.")  # noqa: T201
+    else:  # Close button (index == -1)
+        print("Ok bye.")  # noqa: T201
+    state.show_dialog = False
+
+
+with tgb.Page() as page:
+    with tgb.dialog("{show_dialog}", title="Welcome!", on_action=dialog_action, labels="Couldn't be better;Not my day"):  # type: ignore
+        tgb.html("h2", "Hello!")
+
+    tgb.button("Show", on_action=lambda s: s.assign("show_dialog", True))
+
+if __name__ == "__main__":
+    Gui(page).run(title="Dialog - Labels")

+ 40 - 0
doc/gui/examples/blocks/dialog_labels/markdown.py

@@ -0,0 +1,40 @@
+# Copyright 2021-2024 Avaiga Private Limited
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations under the License.
+# -----------------------------------------------------------------------------------------
+# To execute this script, make sure that the taipy-gui package is installed in your
+# Python environment and run:
+#     python <script>
+# -----------------------------------------------------------------------------------------
+from taipy.gui import Gui
+
+show_dialog = False
+
+
+def dialog_action(state, _, payload):
+    if payload["args"][0] == 0:  # First button
+        print("Good to hear!")  # noqa: T201
+    elif payload["args"][0] == 1:  # Second button
+        print("Sorry to hear that.")  # noqa: T201
+    else:  # Close button (index == -1)
+        print("Ok bye.")  # noqa: T201
+    state.show_dialog = False
+
+
+page = """
+<|{show_dialog}|dialog|title=Welcome!|on_action=dialog_action|labels=Couldn't be better;Not my day|
+## Hello!
+|>
+
+<|Show|button|on_action={lambda s: s.assign("show_dialog", True)}|>
+"""
+
+if __name__ == "__main__":
+    Gui(page).run(title="Dialog - Labels")

+ 1 - 0
doc/gui/examples/blocks/dialog_show_hide/__init__.py

@@ -0,0 +1 @@
+# This file makes this directory a module on its own, mandatory for mypy.

+ 37 - 0
doc/gui/examples/blocks/dialog_show_hide/builder.py

@@ -0,0 +1,37 @@
+# Copyright 2021-2024 Avaiga Private Limited
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations under the License.
+# -----------------------------------------------------------------------------------------
+# To execute this script, make sure that the taipy-gui package is installed in your
+# Python environment and run:
+#     python <script>
+# -----------------------------------------------------------------------------------------
+import taipy.gui.builder as tgb
+from taipy.gui import Gui
+
+show_dialog = False
+
+def show(state):
+    state.show_dialog = True
+
+def hide(state):
+    state.show_dialog = False
+
+with tgb.Page() as page:
+    tgb.dialog("{show_dialog}", on_action=hide)
+    # Using a lambda function:
+    # tgb.dialog("{show_dialog}", on_action=lambda s: s.assign("show_dialog", False))
+
+    tgb.button("Show", on_action=show)
+    # Using a lambda function:
+    # tgb.button("Show", on_action=lambda s: s.assign("show_dialog", True))
+
+if __name__ == "__main__":
+    Gui(page).run(title="Dialog - Show/Hide")

+ 43 - 0
doc/gui/examples/blocks/dialog_show_hide/markdown.py

@@ -0,0 +1,43 @@
+# Copyright 2021-2024 Avaiga Private Limited
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations under the License.
+# -----------------------------------------------------------------------------------------
+# To execute this script, make sure that the taipy-gui package is installed in your
+# Python environment and run:
+#     python <script>
+# -----------------------------------------------------------------------------------------
+from taipy.gui import Gui
+
+show_dialog = False
+
+
+def show(state):
+    state.show_dialog = True
+
+
+def hide(state):
+    state.show_dialog = False
+
+
+# Using lambda functions instead of the show() and hide() functions
+#
+# dialog:
+# <|{show_dialog}|dialog|on_action={lambda s: s.assign("show_dialog", False)}|>
+#
+# button:
+# <|Show|button|on_action={lambda s: s.assign("show_dialog", True)}|>
+page = """
+<|{show_dialog}|dialog|on_action=hide|>
+
+<|Show|button|on_action=show|>
+"""
+
+if __name__ == "__main__":
+    Gui(page).run(title="Dialog - Show/Hide")

+ 31 - 0
doc/gui/examples/builder_lambda_property.py

@@ -0,0 +1,31 @@
+# Copyright 2021-2024 Avaiga Private Limited
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations under the License.
+# -----------------------------------------------------------------------------------------
+# To execute this script, make sure that the taipy-gui package is installed in your
+# Python environment and run:
+#     python <script>
+# -----------------------------------------------------------------------------------------
+import taipy.gui.builder as tgb
+from taipy.gui import Gui
+
+persons = {"Albert": 1982, "Beatrix": 1955, "Cecilia": 2003}
+
+current_year = 2024
+
+with tgb.Page() as page:
+    tgb.text("Year: ", inline=True)
+    tgb.slider("{current_year}", min=1990, max=2050, inline=True)
+
+    for name, birth_year in persons.items():
+        tgb.text(lambda current_year: f"{name} would be {current_year-birth_year}")  # noqa: B023
+
+if __name__ == "__main__":
+    Gui(page).run(title="Page Builder - Using lambdas in property values")

+ 0 - 0
doc/gui/examples/charts/advanced-selection.py → doc/gui/examples/charts/advanced_selection.py


+ 1 - 1
doc/gui/examples/charts/advanced-shapes.py → doc/gui/examples/charts/advanced_shapes.py

@@ -61,4 +61,4 @@ page = """
 
 
 if __name__ == "__main__":
-    Gui(page).run(title="Chart - Advanced - Annotations")
+    Gui(page).run(title="Chart - Advanced - Shapes")

+ 0 - 0
doc/gui/examples/charts/advanced-unbalanced-datasets.py → doc/gui/examples/charts/advanced_unbalanced_datasets.py


+ 0 - 0
doc/gui/examples/charts/bar-facing.py → doc/gui/examples/charts/bar_facing.py


+ 0 - 0
doc/gui/examples/charts/bar-multiple.py → doc/gui/examples/charts/bar_multiple.py


+ 0 - 0
doc/gui/examples/charts/bar-simple.py → doc/gui/examples/charts/bar_simple.py


+ 0 - 0
doc/gui/examples/charts/bar-stacked.py → doc/gui/examples/charts/bar_stacked.py


+ 0 - 0
doc/gui/examples/charts/basics-multiple.py → doc/gui/examples/charts/basics_multiple.py


+ 0 - 0
doc/gui/examples/charts/basics-simple.py → doc/gui/examples/charts/basics_simple.py


+ 0 - 0
doc/gui/examples/charts/basics-timeline.py → doc/gui/examples/charts/basics_timeline.py


+ 0 - 0
doc/gui/examples/charts/basics-title.py → doc/gui/examples/charts/basics_title.py


+ 0 - 0
doc/gui/examples/charts/basics-two-y-axis.py → doc/gui/examples/charts/basics_two_y_axis.py


+ 0 - 0
doc/gui/examples/charts/basics-xrange.py → doc/gui/examples/charts/basics_xrange.py


+ 0 - 0
doc/gui/examples/charts/bubble-hover.py → doc/gui/examples/charts/bubble_hover.py


+ 0 - 0
doc/gui/examples/charts/bubble-simple.py → doc/gui/examples/charts/bubble_simple.py


+ 0 - 0
doc/gui/examples/charts/bubble-symbols.py → doc/gui/examples/charts/bubble_symbols.py


+ 0 - 0
doc/gui/examples/charts/candlestick-simple.py → doc/gui/examples/charts/candlestick_simple.py


+ 0 - 0
doc/gui/examples/charts/candlestick-styling.py → doc/gui/examples/charts/candlestick_styling.py


+ 0 - 0
doc/gui/examples/charts/candlestick-timeseries.py → doc/gui/examples/charts/candlestick_timeseries.py


+ 0 - 0
doc/gui/examples/charts/continuous-error-multiple.py → doc/gui/examples/charts/continuous_error_multiple.py


+ 0 - 0
doc/gui/examples/charts/continuous-error-simple.py → doc/gui/examples/charts/continuous_error_simple.py


+ 0 - 0
doc/gui/examples/charts/error-bars-asymmetric.py → doc/gui/examples/charts/error_bars_asymmetric.py


+ 0 - 0
doc/gui/examples/charts/error-bars-simple.py → doc/gui/examples/charts/error_bars_simple.py


+ 0 - 0
doc/gui/examples/charts/example-rebuild.py → doc/gui/examples/charts/example_rebuild.py


+ 0 - 0
doc/gui/examples/charts/filled-area-normalized.py → doc/gui/examples/charts/filled_area_normalized.py


+ 0 - 0
doc/gui/examples/charts/filled-area-overlay.py → doc/gui/examples/charts/filled_area_overlay.py


+ 0 - 0
doc/gui/examples/charts/filled-area-simple.py → doc/gui/examples/charts/filled_area_simple.py


+ 0 - 0
doc/gui/examples/charts/filled-area-stacked.py → doc/gui/examples/charts/filled_area_stacked.py


+ 0 - 0
doc/gui/examples/charts/funnel-area.py → doc/gui/examples/charts/funnel_area.py


+ 0 - 0
doc/gui/examples/charts/funnel-area-multiple.py → doc/gui/examples/charts/funnel_area_multiple.py


+ 0 - 0
doc/gui/examples/charts/funnel-multiple.py → doc/gui/examples/charts/funnel_multiple.py


+ 0 - 0
doc/gui/examples/charts/funnel-simple.py → doc/gui/examples/charts/funnel_simple.py


+ 0 - 0
doc/gui/examples/charts/funnel-styling.py → doc/gui/examples/charts/funnel_styling.py


+ 0 - 0
doc/gui/examples/charts/gantt-simple.py → doc/gui/examples/charts/gantt_simple.py


+ 0 - 0
doc/gui/examples/charts/heatmap-annotated.py → doc/gui/examples/charts/heatmap_annotated.py


+ 0 - 0
doc/gui/examples/charts/heatmap-colorscale.py → doc/gui/examples/charts/heatmap_colorscale.py


+ 0 - 0
doc/gui/examples/charts/heatmap-drawing-on-top.py → doc/gui/examples/charts/heatmap_drawing_on_top.py


+ 1 - 1
doc/gui/examples/charts/heatmap-simple.py → doc/gui/examples/charts/heatmap_simple.py

@@ -31,4 +31,4 @@ page = """
 """
 
 if __name__ == "__main__":
-    Gui(page).run(title="Chart - Heatmap - Basic")
+    Gui(page).run(title="Chart - Heatmap - Simple")

+ 0 - 0
doc/gui/examples/charts/heatmap-unbalanced.py → doc/gui/examples/charts/heatmap_unbalanced.py


+ 1 - 1
doc/gui/examples/charts/heatmap-unequal-cell-sizes.py → doc/gui/examples/charts/heatmap_unequal_cell_sizes.py

@@ -61,4 +61,4 @@ page = """
 """
 
 if __name__ == "__main__":
-    Gui(page).run(title="Chart - Heatmap - Unequal block sizes")
+    Gui(page).run(title="Chart - Heatmap - Unequal cell sizes")

+ 0 - 0
doc/gui/examples/charts/histogram-binning-function.py → doc/gui/examples/charts/histogram_binning_function.py


+ 0 - 0
doc/gui/examples/charts/histogram-cumulative.py → doc/gui/examples/charts/histogram_cumulative.py


+ 0 - 0
doc/gui/examples/charts/histogram-horizontal.py → doc/gui/examples/charts/histogram_horizontal.py


+ 0 - 0
doc/gui/examples/charts/histogram-nbins.py → doc/gui/examples/charts/histogram_nbins.py


+ 0 - 0
doc/gui/examples/charts/histogram-normalized.py → doc/gui/examples/charts/histogram_normalized.py


+ 0 - 0
doc/gui/examples/charts/histogram-overlay.py → doc/gui/examples/charts/histogram_overlay.py


+ 0 - 0
doc/gui/examples/charts/histogram-simple.py → doc/gui/examples/charts/histogram_simple.py


+ 0 - 0
doc/gui/examples/charts/histogram-stacked.py → doc/gui/examples/charts/histogram_stacked.py


+ 0 - 0
doc/gui/examples/charts/line-style.py → doc/gui/examples/charts/line_style.py


+ 0 - 0
doc/gui/examples/charts/line-texts.py → doc/gui/examples/charts/line_texts.py


+ 0 - 0
doc/gui/examples/charts/map-bubbles.py → doc/gui/examples/charts/map_bubbles.py


+ 0 - 0
doc/gui/examples/charts/map-lines.py → doc/gui/examples/charts/map_lines.py


+ 0 - 0
doc/gui/examples/charts/map-simple.py → doc/gui/examples/charts/map_simple.py


+ 0 - 0
doc/gui/examples/charts/pie-multiple.py → doc/gui/examples/charts/pie_multiple.py


+ 0 - 0
doc/gui/examples/charts/pie-simple.py → doc/gui/examples/charts/pie_simple.py


+ 1 - 1
doc/gui/examples/charts/pie-styling.py → doc/gui/examples/charts/pie_styling.py

@@ -42,4 +42,4 @@ page = """
 """
 
 if __name__ == "__main__":
-    Gui(page).run(title="Chart - Pie - Style")
+    Gui(page).run(title="Chart - Pie - Styling")

+ 0 - 0
doc/gui/examples/charts/polar-angular-axis.py → doc/gui/examples/charts/polar_angular_axis.py


+ 0 - 0
doc/gui/examples/charts/polar-area.py → doc/gui/examples/charts/polar_area.py


+ 0 - 0
doc/gui/examples/charts/polar-multiple.py → doc/gui/examples/charts/polar_multiple.py


+ 0 - 0
doc/gui/examples/charts/polar-sectors.py → doc/gui/examples/charts/polar_sectors.py


+ 0 - 0
doc/gui/examples/charts/polar-simple.py → doc/gui/examples/charts/polar_simple.py


+ 0 - 0
doc/gui/examples/charts/polar-tick-texts.py → doc/gui/examples/charts/polar_tick_texts.py


+ 0 - 0
doc/gui/examples/charts/radar-multiple.py → doc/gui/examples/charts/radar_multiple.py


+ 0 - 0
doc/gui/examples/charts/radar-simple.py → doc/gui/examples/charts/radar_simple.py


+ 0 - 0
doc/gui/examples/charts/scatter-classification.py → doc/gui/examples/charts/scatter_classification.py


+ 0 - 0
doc/gui/examples/charts/scatter-more-styling.py → doc/gui/examples/charts/scatter_more_styling.py


+ 0 - 0
doc/gui/examples/charts/scatter-regression.py → doc/gui/examples/charts/scatter_regression.py


+ 0 - 0
doc/gui/examples/charts/scatter-styling.py → doc/gui/examples/charts/scatter_styling.py


+ 0 - 0
doc/gui/examples/charts/treemap-hierarchical.py → doc/gui/examples/charts/treemap_hierarchical.py


+ 0 - 0
doc/gui/examples/charts/treemap-hierarchical-values.py → doc/gui/examples/charts/treemap_hierarchical_values.py


+ 0 - 0
doc/gui/examples/charts/treemap-simple.py → doc/gui/examples/charts/treemap_simple.py


+ 0 - 0
doc/gui/examples/charts/waterfall-period_levels.py → doc/gui/examples/charts/waterfall_period_levels.py


+ 0 - 0
doc/gui/examples/charts/waterfall-simple.py → doc/gui/examples/charts/waterfall_simple.py


+ 0 - 0
doc/gui/examples/charts/waterfall-styling.py → doc/gui/examples/charts/waterfall_styling.py


+ 0 - 0
doc/gui/examples/controls/chat-calculator.py → doc/gui/examples/controls/chat_calculator.py


+ 0 - 0
doc/gui/examples/controls/chat-discuss.py → doc/gui/examples/controls/chat_discuss.py


+ 0 - 0
doc/gui/examples/controls/file_download-dynamic.py → doc/gui/examples/controls/file_download_dynamic.py


+ 1 - 1
doc/gui/examples/controls/file_download-dynamic-temp-file.py → doc/gui/examples/controls/file_download_dynamic_temp_file.py

@@ -75,4 +75,4 @@ Precision:
 """
 
 if __name__ == "__main__":
-    Gui(page).run(title="File Download - Dynamic content")
+    Gui(page).run(title="File Download - Temporary file")

+ 0 - 0
doc/gui/examples/controls/metric-color-map.py → doc/gui/examples/controls/metric_color_map.py


+ 0 - 0
doc/gui/examples/controls/metric-delta-color.py → doc/gui/examples/controls/metric_delta_color.py


+ 0 - 0
doc/gui/examples/controls/metric-formats.py → doc/gui/examples/controls/metric_formats.py


+ 0 - 0
doc/gui/examples/controls/metric-hide-value.py → doc/gui/examples/controls/metric_hide_value.py


+ 0 - 0
doc/gui/examples/controls/metric-layout.py → doc/gui/examples/controls/metric_layout.py


+ 0 - 0
doc/gui/examples/controls/metric-range.py → doc/gui/examples/controls/metric_range.py


+ 0 - 0
doc/gui/examples/controls/metric-simple.py → doc/gui/examples/controls/metric_simple.py


+ 0 - 0
doc/gui/examples/controls/metric-type.py → doc/gui/examples/controls/metric_type.py


+ 0 - 0
doc/gui/examples/controls/number-min-max.py → doc/gui/examples/controls/number_min_max.py


+ 25 - 0
doc/gui/examples/controls/number_simple.py

@@ -0,0 +1,25 @@
+# Copyright 2021-2024 Avaiga Private Limited
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+#        http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations under the License.
+# -----------------------------------------------------------------------------------------
+# To execute this script, make sure that the taipy-gui package is installed in your
+# Python environment and run:
+#     python <script>
+# -----------------------------------------------------------------------------------------
+from taipy.gui import Gui
+
+value = 50
+
+page = """
+<|{value}|number|>
+"""
+
+if __name__ == "__main__":
+    Gui(page).run(title="Number - Simple")

+ 0 - 0
doc/gui/examples/controls/number-step.py → doc/gui/examples/controls/number_step.py


+ 0 - 0
doc/gui/examples/controls/progress-linear.py → doc/gui/examples/controls/progress_linear.py


部分文件因文件數量過多而無法顯示