# Is it possible to wrap label text on a bar chart?

**URL:** https://community.glideapps.com/t/is-it-possible-to-wrap-label-text-on-a-bar-chart/56333
**Category:** Ask for Help
**Created:** [January 4, 2023, 3:37pm UTC](https://community.glideapps.com/t/is-it-possible-to-wrap-label-text-on-a-bar-chart/56333 "2023-01-04T15:37:23Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [January 5, 2023, 1:21am UTC](https://community.glideapps.com/t/is-it-possible-to-wrap-label-text-on-a-bar-chart/56333/2 "2023-01-05T01:21:24Z")

</div>

> [@heart\_eyes Quickchart.io: the Cloudinary of Charts —on the fly charts!](https://community.glideapps.com/t/quickchart-io-the-cloudinary-of-charts-on-the-fly-charts/15946):
>
> GAME CHANGER! Stumbled upon this site today—a way to create on the fly charts using data from your Glide tables. Images render instantly and you can select one of 14 different charts, customize colors, styles etc all through URL parameters! The video below shows my first attempt to create a chart from scratch and implement it in Glide. Took me less than 5 minutes. End result:

I think the only way is to use Quickchart instead.

In Quickchart, you can wrap the labels of a chart by using the `labelRotation` property of the `xAxis` or `yAxis` configuration object.

For example, here’s how you can wrap the labels of a `xAxis` in a bar chart:

```auto
{
  xAxis: {
    categories: ['This is a very long label that will be wrapped', 'This is another long label'],
    labelRotation: -45
  }
}

```

You can specify any angle for the `labelRotation` property, but negative values will cause the labels to be rotated to the left (counterclockwise), and positive values will cause them to be rotated to the right (clockwise).

You can also use the `wrap` callback function of the `formatter` property to customize the way the labels are wrapped. This function will be called for each label, and you can return a string that contains line breaks to wrap the label.

For example:

```auto
{
  xAxis: {
    categories: ['This is a very long label that will be wrapped', 'This is another long label'],
    labelRotation: -45,
    formatter: function() {
      return this.value.replace(/ /g, '<br>');
    }
  }
}

```

This will replace all spaces in the labels with line breaks, causing them to be wrapped.

---

_[View the full topic](https://community.glideapps.com/t/is-it-possible-to-wrap-label-text-on-a-bar-chart/56333)._
