Showing all labels in a horizontal bar chart (Blazor)

125 views Asked by At

I am currently trying to display every label in my horizontal bar chart. It currently looks as follows.

Horizontal Bar Chart

As you can see the Measurement-Start is not displayed.

My code looks as follows:

public BarChartOptions GetBarChartOptionsBeginAtZeroHorizontal()
{
    var barChartOptions = new BarChartOptions
    {
        IndexAxis = "y",
        Scales = new()
        {
            Y = new()
            {
                BeginAtZero = true,
            },
        }
    };

I am using Blazor with the following versions:

  • .NET 8 RC2
  • chart.js 3.9.1

How can I achieve it so every label is displayed in this chart?

0

There are 0 answers