bulubuloa / Ultimate-Xamarin-Forms-KIT

A powerful 🚀 Android/iOS chart view / graph view library, binding support for Xamarin.Forms, supporting line- bar- pie- radar- bubble- and candlestick charts as well as scaling, dragging and animations.
https://www.nuget.org/packages/UltimateXF/
121 stars 33 forks source link

Chart Labels are duplicating when label list is 2 #17

Open eliyasbaby opened 5 years ago

eliyasbaby commented 5 years ago

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

sandy0089 commented 12 months ago

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.