Spaces:
Running
Running
Commit ·
7795980
1
Parent(s): 5d3ed2f
Simplify actions arguments and remove unnecessary trailing commas
Browse files- Convert single-element actions lists to direct action objects
- Remove unnecessary trailing commas from last items in structures
- Example: actions=[x] -> actions=x, and ),\n] -> )\n]
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
app.py
CHANGED
|
@@ -161,9 +161,7 @@ regions_page = vm.Page(
|
|
| 161 |
id="region_map_chart",
|
| 162 |
header="💡 Click on a state to filter charts on the right.",
|
| 163 |
figure=create_map_bubble_new(superstore_df, value_col="Sales", custom_data=["State_Code"]),
|
| 164 |
-
actions=
|
| 165 |
-
va.set_control(control="state_filter", value="State_Code"),
|
| 166 |
-
],
|
| 167 |
),
|
| 168 |
],
|
| 169 |
),
|
|
@@ -184,8 +182,8 @@ regions_page = vm.Page(
|
|
| 184 |
components=[
|
| 185 |
vm.Graph(
|
| 186 |
id="pg2-chart-1",
|
| 187 |
-
figure=bar_chart_top_n(superstore_df, x="Sales", y="City")
|
| 188 |
-
)
|
| 189 |
],
|
| 190 |
variant="filled",
|
| 191 |
),
|
|
@@ -264,9 +262,7 @@ products_page = vm.Page(
|
|
| 264 |
vm.Graph(
|
| 265 |
id="pg4-chart-1",
|
| 266 |
figure=bar_chart_by_category(superstore_df, custom_data=["Category"]),
|
| 267 |
-
actions=
|
| 268 |
-
va.set_control(control="pg4-filter-1", value="Category"),
|
| 269 |
-
],
|
| 270 |
),
|
| 271 |
],
|
| 272 |
variant="filled",
|
|
@@ -336,7 +332,7 @@ orders_page = vm.Page(
|
|
| 336 |
vm.Button(
|
| 337 |
text="Export data",
|
| 338 |
icon="download",
|
| 339 |
-
actions=
|
| 340 |
),
|
| 341 |
],
|
| 342 |
)
|
|
|
|
| 161 |
id="region_map_chart",
|
| 162 |
header="💡 Click on a state to filter charts on the right.",
|
| 163 |
figure=create_map_bubble_new(superstore_df, value_col="Sales", custom_data=["State_Code"]),
|
| 164 |
+
actions=va.set_control(control="state_filter", value="State_Code"),
|
|
|
|
|
|
|
| 165 |
),
|
| 166 |
],
|
| 167 |
),
|
|
|
|
| 182 |
components=[
|
| 183 |
vm.Graph(
|
| 184 |
id="pg2-chart-1",
|
| 185 |
+
figure=bar_chart_top_n(superstore_df, x="Sales", y="City")
|
| 186 |
+
)
|
| 187 |
],
|
| 188 |
variant="filled",
|
| 189 |
),
|
|
|
|
| 262 |
vm.Graph(
|
| 263 |
id="pg4-chart-1",
|
| 264 |
figure=bar_chart_by_category(superstore_df, custom_data=["Category"]),
|
| 265 |
+
actions=va.set_control(control="pg4-filter-1", value="Category"),
|
|
|
|
|
|
|
| 266 |
),
|
| 267 |
],
|
| 268 |
variant="filled",
|
|
|
|
| 332 |
vm.Button(
|
| 333 |
text="Export data",
|
| 334 |
icon="download",
|
| 335 |
+
actions=va.export_data(targets=["table_id"], file_format="xlsx"),
|
| 336 |
),
|
| 337 |
],
|
| 338 |
)
|