コード例 #1
0
 public override void AlterDataPointLabel(ShinobiChart chart, SChartDataPointLabel label, SChartDataPoint dataPoint, SChartSeries series)
 {
     // Do some additional label styling
     label.Layer.CornerRadius = 10;
     label.BackgroundColor = UIColor.FromWhiteAlpha (0.8f, 1f);
     label.Frame = new CGRect (label.Frame.X -10, label.Frame.Y, label.Frame.Width + 20, label.Frame.Height);
     label.TextAlignment = UITextAlignment.Center;
 }
コード例 #2
0
 public ChartDataSource(IList <Tds> data, SChartSeries series,
                        Func <object, NSObject> xValueConvertor,
                        Func <object, NSObject> yValueConvertor)
 {
     if (data != null)
     {
         // Convert the provided data objects to SChartDataPoints
         _dataPoints = data.Select(o => {
             return(new SChartDataPoint()
             {
                 XValue = xValueConvertor(o),
                 YValue = yValueConvertor(o)
             });
         }).ToList();
     }
     else
     {
         _dataPoints = new List <SChartDataPoint> ();
     }
     Series = series;
 }
コード例 #3
0
        void ColumnChartToggledSelection(ShinobiChart chart, SChartSeries series, SChartDataPoint dataPoint, CGPoint pixelPoint)
        {
            // Determine which year was tapped
            string tappedYear = series.Title;

            // Update the datasources
            columnChartDataSource.DisplayYear = tappedYear;
            pieChartDataSource.DisplayYear = tappedYear;

            // Update the pie chart state
            UpdatePieTitle ();
            pieChart.ReloadData ();
            pieChart.RedrawChart ();
        }
コード例 #4
0
 protected override void OnToggledSelection(ShinobiChart chart, SChartSeries series, SChartDataPoint dataPoint, CGPoint pixelPoint)
 {
     if (ToggledSelection != null) {
         ToggledSelection (chart, series, dataPoint, pixelPoint);
     }
 }