text stringlengths 39 336 |
|---|
# Create and initialize a page:
from taipy import Gui
Gui("# Data Overview") |
# Define a page variable and initialize it:
md_content = "# Data Overview"
Gui(md_content) |
# Define 2 pages and set them up:
content_pages = {
'overview': Markdown("# Overview"),
'details': Markdown("# Details")
}
Gui(pages=content_pages) |
# Set up a multi-page application:
from taipy import Gui
root_content="# Welcome to the App"
page1_content="# Page 1"
page2_content="# Page 2"
pages_dict = {
"/": root_content,
"page1": page1_content,
"page2": page2_content
}
Gui(pages=pages_dict).run() |
# Set up a multi-page application with content placeholder:
from taipy import Gui
root_content="""#
Multi-page application
This app was built using Taipy.
"""
page1_content="# Page 1"
page2_content="# Page 2"
pages_dict = {
"/": root_content,
"page1": page1_content,
"page2": page2_content
}
Gui(pages=pages_dict).run() |
# Create a dialog with Markdown content:
dialog_content="""
<|{is_visible}|dialog|
Please enter your name:
<|{user_name}|input|>
|>"""
Gui(dialog_content).run() |
# Set up a partial page:
gui_instance = Gui()
user_prompt = gui_instance.add_partial(
"""
Please enter your name:
<|{user_name}|input|>
"""
)
gui_instance.run() |
# Display a calculated result:
<|{result}|> |
# Format the value with 2 decimal points:
<|{value}|text|format=%.2f|> |
# Create a button with the label 'Click Me':
<|Click Me|button|> |
# Create a Save button:
<|Save|button|> |
# Create a Cancel button and set the action function name:
<|Cancel|button|on_action=cancel_action_function|> |
# Create a Cancel button with cancel_handler function:
<|Cancel|button|on_action=cancel_handler|> |
# Create an input field for username:
<|{username}|input|> |
# Create an input field for location:
<|{location}|input|> |
# Create a numeric field for age:
<|{age}|number|> |
# Create a slider for value between 1 and 10:
<|{rating}|slider|min=1|max=10|> |
# Create a set of toggle buttons for Option 1, Option 2, Option 3:
<|{choice}|toggle|lov=Option 1;Option 2;Option 3|> |
# Create a toggle control to select a specific category:
<|{category_sel}|toggle|lov={categories}|type=Category|adapter={lambda c: (c.id, c.name)}|> |
# Create a date picker:
<|{event_date}|date|> |
# Create a date picker without time:
<|{event_date}|date|not with_time|> |
# Create a date picker with only date:
<|{event_date}|date|not with_time|> |
# Create a file download link:
<|{document}|file_download|> |
# Create a file download link with action:
<|{document}|file_download|label=Download Document|on_action=download_file|name=file_name|> |
# Create a file download link without preview:
<|{document}|file_download|bypass_preview=False|> |
# Create an auto download file link:
<|{document}|file_download|auto|> |
# Create a file selector:
<|{selected_file}|file_selector|> |
# Create a file selector with label and action:
<|{selected_file}|file_selector|label=Select File|on_action=file_selected|extensions=.csv,.xlsx|drop_message=Drop file here|> |
# Create a multiple file uploader:
<|{selected_files}|file_selector|multiple|> |
# Show an illustration:
<|{illustration}|image|> |
# Show an image with description and callback:
<|{picture}|image|label=This is a picture|on_action=image_clicked|> |
# Display a message at a specified position between min and max:
<|status|indicator|value={percentage}|min=0|max=100|> |
# Define a basic static menu:
<|menu|lov=menu_item1;menu_item2|> |
# Plot Sales according to Date in a line chart:
<|{data}|chart|type=lines|x=DATE|y=SALES|> |
# Plot Sales according to Date in a line chart titled "Sales according to Revenue":
<|{data}|chart|type=lines|x=DATE|x=SALES|title=SALES according to Revenue|> |
# Plot Sales and Revenue according to Date:
<|{data}|chart|type=lines|x=DATE|y[1]=SALES|y[2]=REVENUE|> |
# Plot Sales according to Date on a Dashed line:
<|{data}|chart|type=lines|x=DATE|x=SALES|line=dash|> |
# Plot Revenue by Date on a dotted line:
<|{data}|chart|type=lines|x=DATE|x=SALES|line=dot|> |
# Plot Sales by Date in Red:
<|{data}|chart|type=lines|x=DATE|x=SALES|color=Red|> |
# Plot Revenue according to Date in yellow:
<|{data}|chart|type=lines|x=DATE|x=SALES|color=Yellow|> |
# Plot Revenue according to Date in yellow titled Revenue Plot:
<|{data}|chart|type=lines|x=DATE|x=SALES|color=Yellow|title=REVENUE Plot> |
# Plot Sales in blue and Revenue in green according to Date:
<|{data}|chart|type=lines|x=DATE|y[1]=SALES|y[2]=REVENUE|color[1]=blue|color[2]=green|> |
# Plot Revenue by Date in a red dashed line and Sales in a yellow Dotted line:
<|{data}|chart|type=lines|x=DATE|y[1]=REVENUE|y[2]=SALES|line[1]=dash|line[2]=dot|color[1]=red|color[2]=yellow|> |
# Display Date according to Sales:
<|{data}|chart|type=lines|x=DATE|x=SALES|> |
# Plot in a bar chart the Sales according to Date:
<|{data}|chart|type=bar|x=DATE|x=SALES|> |
# Plot in a bar chart the Sales according to Date and Revenue according to Date:
<|{data}|chart|type=bar|x=DATE|y[1]=SALES|y[2]=REVENUE|> |
# Plot Sales and Revenue by Date in a bar chart:
<|{data}|chart|type=bar|x=DATE|y[1]=SALES|y[2]=REVENUE|> |
# Plot in a bar chart the Sales according to Date and Revenue according to Date titled Finance:
<|{data}|chart|type=bar|x=DATE|y[1]=SALES|y[2]=REVENUE|title=Finance|> |
# Plot in a scatter plot Sales according to Date:
<|{data}|chart|type=scatter|mode=markers|x=DATE|x=SALES|> |
# Draw Sales and Revenue by Date in a scatter plot:
<|{data}|chart|type=scatter|mode=markers|x=DATE|y[1]=SALES|y[2]=REVENUE|> |
# Plot Revenue in green points and Sales in yellow points by Date:
<|{data}|chart|type=scatter|mode=markers|x=DATE|y[1]=REVENUE|y[2]=SALES|color[1]=green|color[2]=yellow|> |
# Plot a histogram of Sales:
<|{data}|chart|type=histogram|x=SALES|> |
# Display a horizontal histogram of Sales:
<|{data}|chart|type=histogram|x=SALES|> |
# Plot the distribution of Sales and Revenue:
<|{data}|chart|type=histogram|x[1]=SALES|x[2]=REVENUE|> |
# Plot the distribution of Sales and Revenue titled "Sales and Revenue Distribution":
<|{data}|chart|type=histogram|x[1]=SALES|x[2]=REVENUE|title=SALES and Revenue Distribution|> |
# Display a horizontal distribution of Sales and Revenue titled "Sales and Revenue Distribution":
<|{data}|chart|type=histogram|y[1]=SALES|y[2]=REVENUE|title=SALES and Revenue Distribution|> |
# Plot a pie chart of Sales by Date:
<|{data}|chart|type=pie|values=SALES|labels=Date|> |
# Draw a pie chart of Sales by Date titled "Sales Pie Chart":
<|{data}|chart|type=pie|values=SALES|labels=Date|title=SALES Pie Chart|> |
# Plot a pie chart of Revenue by Date:
<|{data}|chart|type=pie|values=REVENUE|labels=Date|> |
# Visualize Profit over Time in a line chart:
<|{data}|chart|type=lines|x=TIME|y=PROFIT|> |
# Showcase Profit over Time in a line chart titled "Profit Trend":
<|{data}|chart|type=lines|x=TIME|y=PROFIT|title=Profit Trend|> |
# Depict Profit and Loss over Time:
<|{data}|chart|type=lines|x=TIME|y[1]=PROFIT|y[2]=LOSS|> |
# Illustrate Profit over Time with a Dashed line:
<|{data}|chart|type=lines|x=TIME|y=PROFIT|line=dash|> |
# Present Loss by Time on a Dotted line:
<|{data}|chart|type=lines|x=TIME|y=LOSS|line=dot|> |
# Plot Profit over Time in Red:
<|{data}|chart|type=lines|x=TIME|y=PROFIT|color=Red|> |
# Exhibit Loss over Time in yellow:
<|{data}|chart|type=lines|x=TIME|y=LOSS|color=Yellow|> |
# Show Profit over Time in yellow titled Profit Overview:
<|{data}|chart|type=lines|x=TIME|y=PROFIT|color=Yellow|title=Profit Overview|> |
# Display Profit in blue and Loss in green over Time:
<|{data}|chart|type=lines|x=TIME|y[1]=PROFIT|y[2]=LOSS|color[1]=blue|color[2]=green|> |
# Visualize Loss by Time in a red dashed line and Profit in a yellow Dotted line:
<|{data}|chart|type=lines|x=TIME|y[1]=LOSS|y[2]=PROFIT|line[1]=dash|line[2]=dot|color[1]=red|color[2]=yellow|> |
# Highlight Time according to Profit:
<|{data}|chart|type=lines|x=TIME|y=PROFIT|> |
# Depict in a bar chart the Profit over Time:
<|{data}|chart|type=bar|x=TIME|y=PROFIT|> |
# Depict in a bar chart the Profit over Time and Loss over Time:
<|{data}|chart|type=bar|x=TIME|y[1]=PROFIT|y[2]=LOSS|> |
# Showcase Profit and Loss by Time in a bar chart:
<|{data}|chart|type=bar|x=TIME|y[1]=PROFIT|y[2]=LOSS|> |
# Depict in a bar chart the Profit over Time and Loss over Time titled Financial Overview:
<|{data}|chart|type=bar|x=TIME|y[1]=PROFIT|y[2]=LOSS|title=Financial Overview|> |
# Depict in a scatter plot Profit over Time:
<|{data}|chart|type=scatter|mode=markers|x=TIME|y=PROFIT|> |
# Illustrate Profit and Loss by Time in a scatter plot:
<|{data}|chart|type=scatter|mode=markers|x=TIME|y[1]=PROFIT|y[2]=LOSS|> |
# Plot Loss in green points and Profit in yellow points by Time:
<|{data}|chart|type=scatter|mode=markers|x=TIME|y[1]=LOSS|y[2]=PROFIT|color[1]=green|color[2]=yellow|> |
# Display a histogram of Profit:
<|{data}|chart|type=histogram|x=PROFIT|> |
# Showcase a horizontal histogram of Profit:
<|{data}|chart|type=histogram|x=PROFIT|> |
# Illustrate the distribution of Profit and Loss:
<|{data}|chart|type=histogram|x[1]=PROFIT|x[2]=LOSS|> |
# Illustrate the distribution of Profit and Loss titled "Profit and Loss Distribution":
<|{data}|chart|type=histogram|x[1]=PROFIT|x[2]=LOSS|title=Profit and Loss Distribution|> |
# Present a horizontal distribution of Profit and Loss titled "Profit and Loss Distribution":
<|{data}|chart|type=histogram|y[1]=PROFIT|y[2]=LOSS|title=Profit and Loss Distribution|> |
# Depict a pie chart of Profit by Time:
<|{data}|chart|type=pie|values=PROFIT|labels=Time|> |
# Illustrate a pie chart of Profit by Time titled "Profit Pie Chart":
<|{data}|chart|type=pie|values=PROFIT|labels=Time|title=Profit Pie Chart|> |
# Depict a pie chart of Loss by Time:
<|{data}|chart|type=pie|values=LOSS|labels=Time|> |
# Visualize Quantity over Time in a line chart:
<|{data}|chart|type=lines|x=TIME|y=QUANTITY|> |
# Showcase Quantity over Time in a line chart titled "Quantity Trend":
<|{data}|chart|type=lines|x=TIME|y=QUANTITY|title=Quantity Trend|> |
# Depict Quantity and Price over Time:
<|{data}|chart|type=lines|x=TIME|y[1]=QUANTITY|y[2]=PRICE|> |
# Illustrate Quantity over Time with a Dashed line:
<|{data}|chart|type=lines|x=TIME|y=QUANTITY|line=dash|> |
# Present Price by Time on a Dotted line:
<|{data}|chart|type=lines|x=TIME|y=PRICE|line=dot|> |
# Plot Quantity over Time in Green:
<|{data}|chart|type=lines|x=TIME|y=QUANTITY|color=Green|> |
# Exhibit Price over Time in Blue:
<|{data}|chart|type=lines|x=TIME|y=PRICE|color=Blue|> |
# Show Price over Time in Blue titled Price Overview:
<|{data}|chart|type=lines|x=TIME|y=PRICE|color=Blue|title=Price Overview|> |
# Display Quantity in Red and Price in Yellow over Time:
<|{data}|chart|type=lines|x=TIME|y[1]=QUANTITY|y[2]=PRICE|color[1]=Red|color[2]=Yellow|> |
# Visualize Price by Time in a Green dashed line and Quantity in a Yellow Dotted line:
<|{data}|chart|type=lines|x=TIME|y[1]=PRICE|y[2]=QUANTITY|line[1]=dash|line[2]=dot|color[1]=Green|color[2]=Yellow|> |
# Highlight Time according to Quantity:
<|{data}|chart|type=lines|x=TIME|y=QUANTITY|> |
# Depict in a bar chart the Quantity over Time:
<|{data}|chart|type=bar|x=TIME|y=QUANTITY|> |
# Depict in a bar chart the Quantity over Time and Price over Time:
<|{data}|chart|type=bar|x=TIME|y[1]=QUANTITY|y[2]=PRICE|> |
# Showcase Quantity and Price by Time in a bar chart:
<|{data}|chart|type=bar|x=TIME|y[1]=QUANTITY|y[2]=PRICE|> |
# Depict in a bar chart the Quantity over Time and Price over Time titled Product Overview:
<|{data}|chart|type=bar|x=TIME|y[1]=QUANTITY|y[2]=PRICE|title=Product Overview|> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.