taipy icon indicating copy to clipboard operation
taipy copied to clipboard

y-axis labels are cut off

Open shoukewei opened this issue 2 years ago • 11 comments

The longer y-axis labels are cut off, United States, United Kingdom in chart. I tried to set a margin, but nothing changed.

image

shoukewei avatar Jul 18 '23 17:07 shoukewei

Adding a left margin in the Taipy chart should allow you to see the entire text. To do so, I created a layout dictionary to change the layout of my chart:

from taipy import Gui 


data = {
    "Temperatures": [[17.2, 27.4, 28.6, 21.5],
                     [5.6, 15.1, 20.2, 8.1],
                     [26.6, 22.8, 21.8, 24.0],
                     [22.3, 15.5, 13.4, 19.6]],
    "Countries": ["United Kingdom", "United States", "Brazil", "Germany"],
    "Seasons": ["Winter", "Spring", "Summer", "Autumn"]
}

layout = {"margin": {"l": 120}}

md = "<|{data}|chart|type=heatmap|z=Temperatures|x=Seasons|y=Countries|layout={layout}|>"

Gui(md).run()

image

Taipy version: 2.3.1

FlorianJacta avatar Jul 19 '23 12:07 FlorianJacta

@shoukewei Can you provide us with some code so we can reproduce this problem? The thing is: Plotly, the front-end rendering library, is in charge of all those layout details and leaves the user in charge of fine-tuning the final output. Margins should be the way to go... but you're saying it has no impact...

Thanks!

FabienLelaquais avatar Dec 05 '23 13:12 FabienLelaquais

@FabienLelaquais Can you add an example in the chart documentation to show how to solve this issue?

Thank you.

jrobinAV avatar Mar 22 '24 14:03 jrobinAV

This issue has been labelled as "🥶Waiting for contributor" because it has been inactive for more than 14 days. If you would like to continue working on this issue, please add another comment or create a PR that links to this issue. If a PR has already been created which refers to this issue, then you should explicitly mention this issue in the relevant PR. Otherwise, you will be unassigned in 14 days. For more information please refer to the contributing guidelines.

github-actions[bot] avatar Jun 05 '24 09:06 github-actions[bot]

I don't know if I'll do that. That would be a setting in Plotly, and there is no reason to focus on this setting and not others. I'll try to come up with a rationale for a go or a no go rapidly.

FabienLelaquais avatar Jun 05 '24 21:06 FabienLelaquais

This issue has been labelled as "🥶Waiting for contributor" because it has been inactive for more than 14 days. If you would like to continue working on this issue, please add another comment or create a PR that links to this issue. If a PR has already been created which refers to this issue, then you should explicitly mention this issue in the relevant PR. Otherwise, you will be unassigned in 14 days. For more information please refer to the contributing guidelines.

github-actions[bot] avatar Jun 21 '24 09:06 github-actions[bot]