def set_xaxis_tick_orientation()

in chartify/_core/axes.py [0:0]


    def set_xaxis_tick_orientation(self, orientation="horizontal"):
        """Change the orientation or the x axis tick labels.

        Args:
            orientation (str or list of str):
                str: 'horizontal', 'vertical', or 'diagonal'
                list of str: different orientation values corresponding to each
                level of the grouping. Example: ['horizontal', 'vertical']
        """

        if not isinstance(orientation, list):
            orientation = [orientation] * 3

        level_1 = orientation[0]
        level_2 = orientation[1] if len(orientation) > 1 else "horizontal"
        level_3 = orientation[2] if len(orientation) > 2 else level_2

        level_1 = self._convert_major_orientation_labels(level_1)
        level_2 = self._convert_subgroup_orientation_labels(level_2)
        level_3 = self._convert_subgroup_orientation_labels(level_3)

        self._chart.figure.xaxis.major_label_orientation = level_1

        xaxis = self._chart.figure.xaxis[0]
        has_subgroup_label = getattr(xaxis, "subgroup_label_orientation", None)
        if has_subgroup_label is not None:
            self._chart.figure.xaxis.subgroup_label_orientation = level_2

        has_group_label = getattr(xaxis, "group_label_orientation", None)
        if has_group_label is not None:
            self._chart.figure.xaxis.group_label_orientation = level_3
        return self._chart