mariusmuntean / ChartJs.Blazor

Brings Chart.js charts to Blazor
https://www.iheartblazor.com/
MIT License
676 stars 151 forks source link

Labels Not Showing Correctly #187

Open bryanp-ramosoil opened 3 years ago

bryanp-ramosoil commented 3 years ago

Describe your question

I'm trying to add labels to a line cart and the labels don't show as intended. As you can see in the image the labels are 1,2,3 ... to 12. In this case it should have months from May to Apr (May, Jun, ... ,Dec , Jan, Feb, Mar, Apr). Is there something I'm missing or is this a bug?

2021-05-12 10_20_00

Which Blazor project type is your question related to?

Which charts is this question related to?

Line Chart

Additional context

Add any additional context, screenshots or code about the question here.

I've tried using lineConfig.Data.Labels.AddRange but that looks to be no longer be supported.

This is what I use to build the labels. foreach (var l in labels) { lineConfig.Data.Labels.Add(l);
}

At the end of it all I use _chart.Update();