Axis X is linked to the page zoom!

Hi,
I've made the bar chart and I don't understand why axis X is linked to the page zoom
Zoom1


Zoom2

 <RadzenChart>
                        <RadzenColumnSeries Data="@graphSales" CategoryProperty="Month" ValueProperty="Revenue" LineType="LineType.Dashed" />
                                                <RadzenColumnOptions Radius="1" />
                        <RadzenCategoryAxis Padding="1" FormatString="{0:MMM}" />
                        <RadzenValueAxis>
                            <RadzenGridLines Visible="true" />
                            <RadzenAxisTitle Text="QuantitΓ©" />
                        </RadzenValueAxis>
 </RadzenChart>

How can I set the X axis to be independent of the page zoom?
Thanks in advance to your support!

Indeed that's the default - Step is automatically calculated based on the chart width. You can set it to a fixed value however be aware that labels will overlap.

<RadzenCategoryAxis Padding="1" FormatString="{0:MMM}" Step="@TimeSpan.FromDays(28)" />
                        
1 Like

Hi, I will try it.
However, what do you means when you say :" however be aware that labels will overlap."
This means that the label on x axis will overlaps, why?

Because there will not be enough room for all of them.

Step="@TimeSpan.FromDays(28)" makes the X-axis independent with the page zoom.
How can I get enough space between them?

Thank you to . I suggest the code below to solve my issue.
It may be useful for others who have the same question.

public IActionResult RevenueByMonth()
        {
            var result = context.Developers
                                 .Where(opportunity => opportunity.Statut == "Closed")
                                 .Where(opportunity => opportunity.DateSolde >= new DateTime( _currentYear, 1, 1)
                                     && opportunity.DateSolde <= new DateTime( _currentYear, 12, 31))
                                .GroupBy(opportunity => opportunity.DateSolde.Month)
                                .OrderBy(opportunity => opportunity.Key)
                                .Select(group => new
                                 {
                                     Month = GetMonthAsText(group.Key, _currentYear),
                                     Revenue = group.Count(),
                                 })
                                 .ToList();
            return Ok(JsonSerializer.Serialize(result, new JsonSerializerOptions
            {
                PropertyNamingPolicy = null
            }));
        }
  private static string GetMonthAsText(int month, int year)
        {
            return month switch
            {
                1 => $"January {year}",
                2 => $"February {year}",
                3 => $"March {year}",
                4 => $"April {year}",
                5 => $"May {year}",
                6 => $"June {year}",
                7 => $"July {year}",
                8 => $"August {year}",
                9 => $"September {year}",
                10 => $"October {year}",
                11 => $"November {year}",
                12 => $"December {year}",
                _ => throw new NotImplementedException(),
            };
        }

The above code refers to : link