# ValueAxis text orientation

**URL:** <https://forum.radzen.com/t/valueaxis-text-orientation/4207>\
**Category:** Blazor Server\
**Created:** [July 10, 2020, 10:13am UTC](https://forum.radzen.com/t/valueaxis-text-orientation/4207 "2020-07-10T10:13:32Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![FredK\_Trashmail](https://forum.radzen.com/user_avatar/forum.radzen.com/fredk_trashmail/32/2226_2.png) [@FredK\_Trashmail](https://forum.radzen.com/u/FredK_Trashmail)\
**Post date:** [July 10, 2020, 10:13am UTC](https://forum.radzen.com/t/valueaxis-text-orientation/4207/1 "2020-07-10T10:13:32Z")

</div>

Hi,

I haven't found the chart setting instructing the ValueAxis text to change its orientation automatically as it seems to be in the RadzenCRM Step by step tutorial.

 ![image](https://forum.radzen.com/uploads/default/original/2X/8/86d1fccde66d58156ee350ea6d4af2cf3d35f515.png)

Thank you

Fred

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [July 10, 2020, 11:59am UTC](https://forum.radzen.com/t/valueaxis-text-orientation/4207/2 "2020-07-10T11:59:47Z")

</div>

Hi @FredK_Trashmail,

There is no such setting and this is why you haven't found it. The title of the value axis is always rotated.

---

<div class="post-metadata">

**Author:** ![FredK\_Trashmail](https://forum.radzen.com/user_avatar/forum.radzen.com/fredk_trashmail/32/2226_2.png) [@FredK\_Trashmail](https://forum.radzen.com/u/FredK_Trashmail)\
**Post date:** [July 12, 2020, 4:18pm UTC](https://forum.radzen.com/t/valueaxis-text-orientation/4207/3 "2020-07-12T16:18:41Z")

</div>

This is what I am struggling with. Mine doesn’t. Small série, large série, it always overlaps and stays horizontal (using Safari).

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [July 12, 2020, 5:04pm UTC](https://forum.radzen.com/t/valueaxis-text-orientation/4207/4 "2020-07-12T17:04:18Z")

</div>

Do you mean the category axis (which is the horizontal one)? If yes - there is no way to change the orientation of the labels at the moment.

---

<div class="post-metadata">

**Author:** ![FredK\_Trashmail](https://forum.radzen.com/user_avatar/forum.radzen.com/fredk_trashmail/32/2226_2.png) [@FredK\_Trashmail](https://forum.radzen.com/u/FredK_Trashmail)\
**Post date:** [July 14, 2020, 4:37pm UTC](https://forum.radzen.com/t/valueaxis-text-orientation/4207/5 "2020-07-14T16:37:49Z")

</div>

Hi Korchev,

This is what I meant. In your Step by Step CRM example, one can see that the labels on the horizontal line are vertical and move / re-render towards a 135° angle as you add width. In the example below, such behaviour doesn't exist and a very limited number of columns make it very messy to read.

Thanks

Fred

 ![image](https://forum.radzen.com/uploads/default/original/2X/e/e933f8c173cfe7877f7a3c5963a8f59b64333d25.png)

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [July 15, 2020, 6:07am UTC](https://forum.radzen.com/t/valueaxis-text-orientation/4207/6 "2020-07-15T06:07:26Z")

</div>

The labels of the horizontal and vertical axis do not support rotation. What you see in the tutorial is a screenshot from the Angular chart component which is an entirely different component based on a third party open source library.

---

<div class="post-metadata">

**Author:** ![john\_town](https://forum.radzen.com/user_avatar/forum.radzen.com/john_town/32/13177_2.png) [@john\_town](https://forum.radzen.com/u/john_town)\
**Post date:** [February 6, 2023, 4:57pm UTC](https://forum.radzen.com/t/valueaxis-text-orientation/4207/7 "2023-02-06T16:57:55Z")

</div>

On another thread you have already showed how to rotate labels by 45 degrees:

 @context.Value

---

<div class="post-metadata">

**Author:** ![jvp](https://forum.radzen.com/letter_avatar_proxy/v4/letter/j/ee7513/32.png) [@jvp](https://forum.radzen.com/u/jvp)\
**Post date:** [July 27, 2023, 7:23pm UTC](https://forum.radzen.com/t/valueaxis-text-orientation/4207/8 "2023-07-27T19:23:17Z")

</div>

any update about this?

---

<div class="post-metadata">

**Author:** ![Werther](https://forum.radzen.com/user_avatar/forum.radzen.com/werther/32/12818_2.png) [@Werther](https://forum.radzen.com/u/Werther)\
**Post date:** [September 14, 2023, 1:39pm UTC](https://forum.radzen.com/t/valueaxis-text-orientation/4207/9 "2023-09-14T13:39:16Z")

</div>

Any update? I need to change the orientation of CategoryAxis values.

 ![image](https://forum.radzen.com/uploads/default/original/2X/9/958bca5901b2a007a30246c6be56dbb6192e2f05.png)

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [September 14, 2023, 2:26pm UTC](https://forum.radzen.com/t/valueaxis-text-orientation/4207/10 "2023-09-14T14:26:34Z")

</div>

> [@Radzen Blazor Chart column description styling](http://forum.radzen.com/t/radzen-blazor-chart-column-description-styling/11484/3):
>
> I've managed to rotate the labels by using the currently available API. Here is how: \<RadzenCategoryAxis\> \<RadzenTicks\> \<Template\> \<text class="rz-tick-text" style="text-anchor: start; transform: translate(@(context.X)px, @(context.Y + 10)px) rotate(45deg)"\>@context.Value\</text\> \</Template\> \</RadzenTicks\> \</RadzenCategoryAxis\>

---

<div class="post-metadata">

**Author:** ![Werther](https://forum.radzen.com/user_avatar/forum.radzen.com/werther/32/12818_2.png) [@Werther](https://forum.radzen.com/u/Werther)\
**Post date:** [September 14, 2023, 3:14pm UTC](https://forum.radzen.com/t/valueaxis-text-orientation/4207/12 "2023-09-14T15:14:41Z")

</div>

Hi Korchev,

After apply the code above inside RadzenChart tags:

 ![image](https://forum.radzen.com/uploads/default/original/2X/2/2db6a6c0d86ec58fcc1029b6efb45d32d8f3d500.png)

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [September 14, 2023, 3:22pm UTC](https://forum.radzen.com/t/valueaxis-text-orientation/4207/13 "2023-09-14T15:22:04Z")

</div>

Seems to work as expected in our demos.

 ![image](https://forum.radzen.com/uploads/default/original/2X/4/4f3a123865f07e3d52cfc09d6a421844be68413f.png)

If you have a subscription you can send us your app to [info@radzen.com](mailto:info@radzen.com) for troubleshooting.

---

<div class="post-metadata">

**Author:** ![Werther](https://forum.radzen.com/user_avatar/forum.radzen.com/werther/32/12818_2.png) [@Werther](https://forum.radzen.com/u/Werther)\
**Post date:** [September 14, 2023, 3:24pm UTC](https://forum.radzen.com/t/valueaxis-text-orientation/4207/14 "2023-09-14T15:24:20Z")

</div>

Do you have the link for the sample above?

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [September 14, 2023, 3:47pm UTC](https://forum.radzen.com/t/valueaxis-text-orientation/4207/15 "2023-09-14T15:47:11Z")

</div>

It is the [online demo](https://blazor.radzen.com/line-chart) which the code from the linked thread.

---

<div class="post-metadata">

**Author:** ![Werther](https://forum.radzen.com/user_avatar/forum.radzen.com/werther/32/12818_2.png) [@Werther](https://forum.radzen.com/u/Werther)\
**Post date:** [September 14, 2023, 6:36pm UTC](https://forum.radzen.com/t/valueaxis-text-orientation/4207/16 "2023-09-14T18:36:40Z")

</div>

Now it's working Korchev. Thanks!

---

<div class="post-metadata">

**Author:** ![Carlos\_Carminati](https://forum.radzen.com/user_avatar/forum.radzen.com/carlos_carminati/32/376_2.png) [@Carlos\_Carminati](https://forum.radzen.com/u/Carlos_Carminati)\
**Post date:** [October 26, 2024, 12:57am UTC](https://forum.radzen.com/t/valueaxis-text-orientation/4207/17 "2024-10-26T00:57:20Z")

</div>

This demo seems to be diferent. I had same problem with category axis and solution explained doesn´t work in my case. Can you provide a new sample?

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [October 26, 2024, 8:12am UTC](https://forum.radzen.com/t/valueaxis-text-orientation/4207/18 "2024-10-26T08:12:46Z")

</div>

Here is a complete working demo:

```auto
@using System.Globalization

<style>
.rz-chart svg {
    overflow: visible;
}
</style>
   <RadzenChart>
        <RadzenChartTooltipOptions Shared="@sharedTooltip" />
        <RadzenLineSeries Smooth="@smooth" Data="@revenue2023" CategoryProperty="Date" Title="2023" LineType="LineType.Dashed" ValueProperty="Revenue">
        </RadzenLineSeries>
        <RadzenLineSeries Smooth="@smooth" Data="@revenue2024" CategoryProperty="Date" Title="2024" ValueProperty="Revenue">
            <RadzenMarkers Visible="@showMarkers" MarkerType="MarkerType.Circle" />
            <RadzenSeriesDataLabels Visible="@showDataLabels" />
        </RadzenLineSeries>
        <RadzenCategoryAxis Padding="20">
            <RadzenTicks>
                <Template>
                    <text class="rz-tick-text" style="text-anchor: start; transform: translate(@(context.X)px, @(context.Y + 10)px) rotate(45deg)">@context.Value</text>
                 </Template>
             </RadzenTicks>
        </RadzenCategoryAxis>
        <RadzenValueAxis Formatter="@FormatAsUSD">
            <RadzenGridLines Visible="true" />
            <RadzenAxisTitle Text="Revenue in USD" />
        </RadzenValueAxis>
    </RadzenChart>

@code {
    bool smooth = false;
    bool sharedTooltip = true;
    bool showDataLabels = false;
    bool showMarkers = true;

    class DataItem
    {
        public string Date { get; set; }
        public double Revenue { get; set; }
    }

    string FormatAsUSD(object value)
    {
        return ((double)value).ToString("C0", CultureInfo.CreateSpecificCulture("en-US"));
    }

    DataItem[] revenue2023 = new DataItem[] {
        new DataItem
        {
            Date = "Jan",
            Revenue = 234000
        },
        new DataItem
        {
            Date = "Feb",
            Revenue = 269000
        },
        new DataItem
        {
            Date = "Mar",
            Revenue = 233000
        },
        new DataItem
        {
            Date = "Apr",
            Revenue = 244000
        },
        new DataItem
        {
            Date = "May",
            Revenue = 214000
        },
        new DataItem
        {
            Date = "Jun",
            Revenue = 253000
        },
        new DataItem
        {
            Date = "Jul",
            Revenue = 274000
        },
        new DataItem
        {
            Date = "Aug",
            Revenue = 284000
        },
        new DataItem
        {
            Date = "Sept",
            Revenue = 273000
        },
        new DataItem
        {
            Date = "Oct",
            Revenue = 282000
        },
        new DataItem
        {
            Date = "Nov",
            Revenue = 289000
        },
        new DataItem
        {
            Date = "Dec",
            Revenue = 294000
        }
    };

    DataItem[] revenue2024 = new DataItem[] {
        new DataItem
        {
            Date = "Jan",
            Revenue = 334000
        },
        new DataItem
        {
            Date = "Feb",
            Revenue = 369000
        },
        new DataItem
        {
            Date = "Mar",
            Revenue = 333000
        },
        new DataItem
        {
            Date = "Apr",
            Revenue = 344000
        },
        new DataItem
        {
            Date = "May",
            Revenue = 314000
        },
        new DataItem
        {
            Date = "Jun",
            Revenue = 353000
        },
        new DataItem
        {
            Date = "Jul",
            Revenue = 374000
        },
        new DataItem
        {
            Date = "Aug",
            Revenue = 384000
        },
        new DataItem
        {
            Date = "Sept",
            Revenue = 373000
        },
        new DataItem
        {
            Date = "Oct",
            Revenue = 382000
        },
        new DataItem
        {
            Date = "Nov",
            Revenue = 389000
        },
        new DataItem
        {
            Date = "Dec",
            Revenue = 394000
        }
    };
}

```

It can be pasted in this [demo](https://blazor.radzen.com/line-chart) and run to produce this:

 ![image](https://forum.radzen.com/uploads/default/original/3X/a/8/a8dc8a03f356064c79232a81cc2c8dc04a0ac6d8.png)

---

<div class="post-metadata">

**Author:** ![Carlos\_Carminati](https://forum.radzen.com/user_avatar/forum.radzen.com/carlos_carminati/32/376_2.png) [@Carlos\_Carminati](https://forum.radzen.com/u/Carlos_Carminati)\
**Post date:** [October 27, 2024, 8:59pm UTC](https://forum.radzen.com/t/valueaxis-text-orientation/4207/19 "2024-10-27T20:59:45Z")

</div>

Thanks! Best regards

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [October 29, 2024, 8:49am UTC](https://forum.radzen.com/t/valueaxis-text-orientation/4207/20 "2024-10-29T08:49:04Z")

</div>

Category axis label rotation is now supported out of the box: [https://blazor.radzen.com/chart-label-rotation](https://blazor.radzen.com/chart-label-rotation)
