Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐛 BUG] How to use the yaxis property of chart #2372

Open
1 of 7 tasks
AlexandreSajus opened this issue Dec 26, 2024 · 0 comments
Open
1 of 7 tasks

[🐛 BUG] How to use the yaxis property of chart #2372

AlexandreSajus opened this issue Dec 26, 2024 · 0 comments
Labels
📄 Documentation Internal or public documentation 🖰 GUI Related to GUI 🆘 Help wanted Open to participation from the community 💥Malfunction Addresses an identified problem. 🟨 Priority: Medium Not blocking but should be addressed

Comments

@AlexandreSajus
Copy link
Contributor

AlexandreSajus commented Dec 26, 2024

What went wrong? 🤔

The documentation for chart refers to a yaxis:
image

But I'm not sure how I am supposed to use it to title the yaxis. This does not work:

import pandas as pd

import taipy.gui.builder as tgb
from taipy.gui import Gui

data = pd.DataFrame({"Product": ["Shovel", "Rake", "Hoe"], "Price": [10, 5, 7]})

yaxis = "Price (USD)"

with tgb.Page() as page:
    tgb.chart(data="{data}", yaxis="{yaxis}")

Gui(page).run()

image

layout is a workaround:

import pandas as pd

import taipy.gui.builder as tgb
from taipy.gui import Gui

data = pd.DataFrame({"Product": ["Shovel", "Rake", "Hoe"], "Price": [10, 5, 7]})

layout = {"yaxis": {"title": "Price (USD)"}}

with tgb.Page() as page:
    tgb.chart(data="{data}", layout="{layout}")

Gui(page).run()

image

Runtime Environment

Windows 11

Browsers

Chrome

OS

Windows

Version of Taipy

4.0.2

Acceptance Criteria

  • A unit test reproducing the bug is added.
  • Any new code is covered by a unit tested.
  • Check code coverage is at least 90%.
  • The bug reporter validated the fix.
  • Related issue(s) in taipy-doc are created for documentation and Release Notes are updated.

Code of Conduct

  • I have checked the existing issues.
  • I am willing to work on this issue (optional)
@AlexandreSajus AlexandreSajus added 📄 Documentation Internal or public documentation 💥Malfunction Addresses an identified problem. ❓ Question Can be unblocked with an answer 🟨 Priority: Medium Not blocking but should be addressed labels Dec 26, 2024
@jrobinAV jrobinAV added the 🖰 GUI Related to GUI label Dec 27, 2024
@Avaiga Avaiga deleted a comment from manaschakrabortty Jan 10, 2025
@Avaiga Avaiga deleted a comment from AlexandreSajus Jan 10, 2025
@jrobinAV jrobinAV added 🆘 Help wanted Open to participation from the community and removed ❓ Question Can be unblocked with an answer labels Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📄 Documentation Internal or public documentation 🖰 GUI Related to GUI 🆘 Help wanted Open to participation from the community 💥Malfunction Addresses an identified problem. 🟨 Priority: Medium Not blocking but should be addressed
Projects
None yet
Development

No branches or pull requests

2 participants