Ultimate-Xamarin-Forms-KIT icon indicating copy to clipboard operation
Ultimate-Xamarin-Forms-KIT copied to clipboard

Chart Labels are duplicating when label list is 2

Open eliyasbaby opened this issue 5 years ago • 1 comments

x axis labels are duplicating when the the label list count is 2

for (int i = 0; i < 2; i++) { entrieLine.Add(new EntryChart(i, random.Next(20))); labels.Add("Entry" + i); } in this case Entry 0 is duplicating upto Entry 1 .eventhough it is only one in the label list

eliyasbaby avatar Jun 06 '19 07:06 eliyasbaby

XAxisConfig XAxis = new XAxisConfig { XAXISPosition = XAXISPosition.BOTTOM, DrawGridLines = false, AxisValueFormatter = new TextByIndexXAxisFormatter(labels), LabelCount = labels.Count, GranularityEnabled = true, };

Add GranularityEnabled = true, this worked for me.

sandy0089 avatar Jul 25 '23 05:07 sandy0089