Skip to content

phamthanhtong/Ultimate-Xamarin-Forms-KIT

 
 

Repository files navigation

Xamarin Forms Custom Renderer

I create this package for sharing all my xamarin forms custom controls

MPAndroidChart Binding

add assembly references

xmlns:ultimateChart="clr-namespace:UltimateXF.Widget.Charts;assembly=UltimateXF"

LineChart & BarChart

<ultimateChart:SupportBarChart  
    x:Name="lineChart"  
    VerticalOptions="FillAndExpand"  
    HorizontalOptions="FillAndExpand"  
    Description="Renderer"  
    IsShowLeftAxis="false"  
    IsShowLeftAxisLine="true"  
    IsShowLeftAxisValue="true"  
    IsShowRightAxis="false"  
    IsShowRightAxisLine="false"  
    IsShowRightAxisValue="false"  
    IsShowXAxis="false"  
    IsShowXAxisLine="true"  
    IsShowXAxisValue="true"  
    XAxisPosition="BOTTOM"  />

DataBinding

var  entries  =  new  List<EntryChart>();  
entries.Add(new  EntryChart(0,5));  
entries.Add(new  EntryChart(1,7));  
entries.Add(new  EntryChart(2,10));  
entries.Add(new  EntryChart(3,3));  
var  dataSet  =  new  BarDataSet(entries,  "Line Chart")  
{  
    DataColor  =  Color.Red,  
    DrawValue  =  false,  
};    
var  data  =  new  BarChartData(new  List<IBarDataSet>(){dataSet},new  List<string>());  
lineChart.ChartData  =  data;

Chart types:

Screenshots are currently taken from the original repository, as they render exactly the same :-)

  • LineChart (with legend, simple design) alt tag

  • LineChart (with legend, simple design) alt tag

  • LineChart (cubic lines) alt tag

  • LineChart (gradient fill) alt tag

  • Combined-Chart (bar- and linechart in this case) alt tag

  • BarChart (with legend, simple design)

alt tag

  • BarChart (grouped DataSets)

alt tag

  • Horizontal-BarChart

alt tag

  • PieChart (with selection, ...)

alt tag

  • ScatterChart (with squares, triangles, circles, ... and more)

alt tag

  • CandleStickChart (for financial data)

alt tag

  • BubbleChart (area covered by bubbles indicates the value)

alt tag

  • RadarChart (spider web chart)

alt tag

License

Copyright 2018 QuachHoang

Special thanks Daniel Cohen Gindi & Philipp Jahoda

About

Custom control renderer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%