def _convert_subgroup_orientation_labels()

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


    def _convert_subgroup_orientation_labels(self, orientation):
        """Map the user inputted orientation values to the values expected by
        bokeh for group labels."""

        if self._vertical:
            horizontal_value = "parallel"
            vertical_value = pi / 180 * 90
        else:
            horizontal_value = "normal"
            vertical_value = "parallel"

        if orientation == "horizontal":
            orientation = horizontal_value
        elif orientation == "vertical":
            orientation = vertical_value
        elif orientation == "diagonal":
            orientation = pi / 180 * 45
        else:
            raise ValueError("Orientation must be `horizontal`, `vertical`, or `diagonal`.")
        return orientation