public void Init() { try { if (!string.IsNullOrEmpty(chartType)) { // assign charts values var chartValues = new ChartValues(); chartData = chartValues.SetChartValues(chartType); //will throw an exception on validation if (chartData.ValidateAll()) { // Set up a default TextPaint object mTextPaint = new TextPaint(); // Call InitGraphics InitGraphics(); } } } catch (System.Exception e) { throw e; } }
public void InitializeGraphValue() { try { if (!string.IsNullOrEmpty(chartType)) { // assign charts values var chartValues = new ChartValues(); var chartData = chartValues.SetChartValues(chartType); //will throw an exception on validation if (chartData.ValidateAll()) { // assign values barcolors = chartData.BarColors; barText = chartData.BarText; xValues = chartData.XValues; legends = chartData.Legends; yValues = chartData.YValues; circleRadius = chartData.Radius; baseValue = chartData.BaseValue; percentage = chartData.Percentage; linesRect = new List <CGRect>(xValues.Capacity); linesPoint = new List <CGPoint>(xValues.Capacity); barRect = new List <CGRect>(barcolors.Capacity); font1 = UIFont.SystemFontOfSize(16); font2 = UIFont.SystemFontOfSize(11); //Commented as we are not using Animation for now // PerformSelector(new ObjCRuntime.Selector("Animateline"), null, 1.0); } } } catch (System.Exception e) { throw e; } }