123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- from taipy.gui import Gui
- samples = {"x": ["Apples", "Apples", "Apples", "Oranges", "Bananas", "Oranges"], "y": [5, 10, 3, 8, 5, 2]}
- data = [samples, samples]
- properties = {
-
- "x[1]": "0/x",
-
- "y[1]": "0/y",
-
- "x[2]": "1/x",
-
- "y[2]": "1/y",
-
- "color": ["#cd5c5c", "#505070"],
-
- "name": ["Count", "Sum"],
-
- "options": [
-
- {"histfunc": "count"},
-
- {"histfunc": "sum"},
- ],
-
- "layout": {"xaxis": {"title": "Fruit"}},
- }
- page = """
- <|{data}|chart|type=histogram|properties={properties}|>
- """
- if __name__ == "__main__":
- Gui(page).run(title="Chart - Histogram - Binning function")
|