Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Changing the angle of Xaxis label in ipyvizzu

How can I change the angle of ipyvizzu x-axis label as by default name of my labels are big and hence adjacent labels overlaps.

Please help.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You can pass a styling object to the animate method next to the chart configuration (see the corresponding tutorial page: https://ipyvizzu.vizzuhq.com/latest/tutorial/color_palette_fonts/)

For setting the angles of the x-axis label, you will need to set plot.xAxis.label.angle parameter. For the full parameter list, see (https://ipyvizzu.vizzuhq.com/latest/tutorial/style/)

chart.animate(
    Style(
        {
            "plot": {
                "xAxis": {
                    "label": {
                      "angle": "0.785rad"
                    }
                }
            }
        }
    )
)

or in short:

chart.animate(Style({ "plot.xAxis.label.angle": "0.785rad" }))

You can set the angle in deg, rad, grad or turn units. see the reference here: https://lib.vizzuhq.com/0.7/reference/modules/vizzu.Styles/#angle

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading