To hide the labels the chart

I just need to hide the labels at the bottom of the chart but it doesn't work. This is my code.

    <TooltipTemplate Context="data">
        <div>
            <strong>Number: </strong><span> @data.number</span><br />
            
        </div>
    </TooltipTemplate>
    <ChildContent>
        @foreach (var object in list)
        {
            <RadzenSeriesAnnotation Visible="true" TItem="CreditoVista" Data="@varible" OffsetY="-16" OffsetX="-40" Text="@number.ToString(" 0.00")" />
        }
        <RadzenMarkers MarkerType="MarkerType.Circle" />
    </ChildContent>
</RadzenLineSeries>
<RadzenCategoryAxis  Padding="10" LabelRotation="-21" >
    <RadzenTicks>
        <Template Context="data">

            @if (_visibleEtiquetasCategoria)
            {
                <span>@data</span>
            }
        </Template>
    </RadzenTicks>
    <RadzenAxisTitle Text="Date" />
</RadzenCategoryAxis>
<RadzenValueAxis Step="@_stepMonto">
    <RadzenGridLines Visible="false" />
    <RadzenAxisTitle Text="Price" />
</RadzenValueAxis>
<RadzenLegend Visible="false" />

And use but it removes the x-axis line as well and I need it to only show and hide the labels

Hi @Josecas05,

I am not sure I understand what the desired outcome is. Do you want to hide the just the text from the category axis?

Hi @korchev
Correct, I just need to hide the category axis text and still see the axis line

The easiest way to hide the text is with CSS:

.rz-category-axis .rz-tick-text {
    display: none;
}

Thanks, I had already tried this option but I only need to hide it when the list is greater than 20, I used the with the but the context of the template is always null

Then try by providing a Formatter function to RadzenCategoryAxis and returning empty string when you don't want the value to appear.

1 Like

Thank you very much, I used the formatter with a function returning Empty string and it worked