コード例 #1
0
 protected void SetRenderer(XYMultipleSeriesRenderer renderer, int[] colors, PointStyle[] styles)
 {
     renderer.AxisTitleTextSize = 16;
     renderer.ChartTitleTextSize = 20;
     renderer.LabelsTextSize = 15;
     renderer.LegendTextSize = 15;
     renderer.PointSize = 5f;
     renderer.SetMargins(new[] { 20, 30, 15, 20 });
     int length = colors.Length;
     for (int i = 0; i < length; i++)
     {
         XYSeriesRenderer r = new XYSeriesRenderer();
         r.Color = colors[i];
         r.PointStyle = styles[i];
         renderer.AddSeriesRenderer(r);
     }
 }
コード例 #2
0
        public override Android.Content.Intent Execute(Android.Content.Context context)
        {
            XYMultipleSeriesDataset series = new XYMultipleSeriesDataset();
            XYValueSeries newTicketSeries = new XYValueSeries("New Tickets");
            newTicketSeries.Add(1f, 2, 14);
            newTicketSeries.Add(2f, 2, 12);
            newTicketSeries.Add(3f, 2, 18);
            newTicketSeries.Add(4f, 2, 5);
            newTicketSeries.Add(5f, 2, 1);
            series.AddSeries(newTicketSeries);
            XYValueSeries fixedTicketSeries = new XYValueSeries("Fixed Tickets");
            fixedTicketSeries.Add(1f, 1, 7);
            fixedTicketSeries.Add(2f, 1, 4);
            fixedTicketSeries.Add(3f, 1, 18);
            fixedTicketSeries.Add(4f, 1, 3);
            fixedTicketSeries.Add(5f, 1, 1);
            series.AddSeries(fixedTicketSeries);

            XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();
            renderer.AxisTitleTextSize = 16;
            renderer.ChartTitleTextSize = 20;
            renderer.LabelsTextSize = 15;
            renderer.LegendTextSize = 15;
            renderer.SetMargins(new int[] { 20, 30, 15, 0 });
            XYSeriesRenderer newTicketRenderer = new XYSeriesRenderer();
            newTicketRenderer.Color = Color.Blue;
            renderer.AddSeriesRenderer(newTicketRenderer);
            XYSeriesRenderer fixedTicketRenderer = new XYSeriesRenderer();
            fixedTicketRenderer.Color = Color.Green;
            renderer.AddSeriesRenderer(fixedTicketRenderer);

            SetChartSettings(renderer, "Project work status", "Priority", "", 0.5, 5.5, 0, 5, Color.Gray, Color.LightGray);
            renderer.XLabels = 7;
            renderer.YLabels = 0;
            renderer.SetShowGrid(false);
            return ChartFactory.GetBubbleChartIntent(context, series, renderer, "Project tickets");
        }
コード例 #3
0
 public XYMultipleSeriesRenderer GetBarDemoRenderer()
 {
     XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();
     renderer.AxisTitleTextSize = 16;
     renderer.ChartTitleTextSize = 20;
     renderer.LabelsTextSize = 15;
     renderer.LegendTextSize = 15;
     renderer.SetMargins(new int[] { 20, 30, 15, 0 });
     SimpleSeriesRenderer r = new SimpleSeriesRenderer();
     r.Color = Color.Blue;
     renderer.AddSeriesRenderer(r);
     r = new SimpleSeriesRenderer();
     r.Color = Color.Green;
     renderer.AddSeriesRenderer(r);
     return renderer;
 }
コード例 #4
0
 private XYMultipleSeriesRenderer GetDemoRenderer()
 {
     XYMultipleSeriesRenderer renderer = new XYMultipleSeriesRenderer();
     renderer.AxisTitleTextSize = 16;
     renderer.ChartTitleTextSize = 20;
     renderer.LabelsTextSize = 15;
     renderer.LegendTextSize = 15;
     renderer.PointSize = 5f;
     renderer.SetMargins(new int[] { 20, 30, 15, 0 });
     XYSeriesRenderer r = new XYSeriesRenderer();
     r.Color = Color.Blue;
     r.PointStyle = PointStyle.Square;
     r.FillBelowLine = true;
     r.SetFillBelowLineColor(Color.White);
     r.FillPoints = true;
     renderer.AddSeriesRenderer(r);
     r = new XYSeriesRenderer();
     r.PointStyle = PointStyle.Circle;
     r.Color = Color.Green;
     r.FillPoints = true;
     renderer.AddSeriesRenderer(r);
     renderer.AxesColor = Color.DarkGray;
     renderer.LabelsColor = Color.LightGray;
     return renderer;
 }