Skip to content

How to rotate x labels in BarChart? #138

Description

@daniele22

Is there a way to rotate the labels in a bar chart and set them e.g. in vertical position because if the labels are too long they overlap each other.

dbscan_DistanceToNearestNeighbor

I tried the following code, the labels rotate but the resulting plot is not good

BarChart.custom(data.map(Bar.apply), spacing = Some(20), barRenderer = Some(labeledByColor))
      .discreteAxis(position = Position.Bottom, labels = labels, values = data , tickRenderer = 
             Some(TickRenderer.axisTickRenderer(Position.Bottom, rotateText = 45)))
      .hline(0)
      .render()

dbscan_DistanceToNearestNeighbor

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions