Changing the angle of Xaxis label in ipyvizzu

55 views Asked by At

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.

1

There are 1 answers

0
simon On BEST ANSWER

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