public override Android.Content.Intent Execute(Android.Content.Context context)
        {
            CategorySeries category = new CategorySeries("Weight indic");

            category.Add("Current", 75);
            category.Add("Minimum", 65);
            category.Add("Maximum", 90);
            DialRenderer renderer = new DialRenderer();

            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.Rgb(0, 150, 0);
            renderer.AddSeriesRenderer(r);
            r       = new SimpleSeriesRenderer();
            r.Color = Color.Green;
            renderer.AddSeriesRenderer(r);
            renderer.LabelsTextSize = 10;
            renderer.LabelsColor    = Color.White;
            renderer.ShowLabels     = true;
            renderer.SetVisualTypes(new DialRenderer.Type[] { DialRenderer.Type.Arrow, DialRenderer.Type.Needle, DialRenderer.Type.Needle });
            renderer.MinValue = 0;
            renderer.MaxValue = 150;
            return(ChartFactory.GetDialChartIntent(context, category, renderer, "Weight indicator"));
        }
Example #2
0
        public void UpdateCategorySeries(CategorySeries categorySeries)
        {
            DataCommand cmd = DataCommandManager.GetDataCommand("UpdateCategorySeries");

            cmd.SetParameterValue("@SysNo", categorySeries.SysNo);
            cmd.SetParameterValue("@C3SysNo", categorySeries.CategorySysNo);
            cmd.ExecuteNonQuery();
        }
Example #3
0
        protected CategorySeries BuildCategoryDataset(String title, double[] values)
        {
            CategorySeries series = new CategorySeries(title);
            int            k      = 0;

            foreach (double item in values)
            {
                series.Add("Project " + ++k, item);
            }
            return(series);
        }
Example #4
0
        /// <summary>
        /// Builds a category series using the provided values.
        /// </summary>
        /// <param name="titles"> the series titles </param>
        /// <param name="values"> the values </param>
        /// <returns> the category series </returns>
        protected internal virtual CategorySeries BuildCategoryDataset(string title, double[] values)
        {
            CategorySeries series = new CategorySeries(title);
            int            k      = 0;

            foreach (double value in values)
            {
                series.Add("Project " + ++k, value);
            }

            return(series);
        }
Example #5
0
        private async void categories_categorySeriesButton_Click(object sender, EventArgs e)
        {
            CategorySeries api = new CategorySeries {
                ApiKey = apiKey
            };

            api.Arguments.category_id = 125;
            if (fredValidationButton.Checked)
            {
                api.Arguments.Validators.Clear();
            }
            SeriesContainer container = syncButton.Checked ? api.Fetch() : await api.FetchAsync();

            ShowResults(api);
        }
Example #6
0
        private XYMultipleSeriesDataset GetBarDemoDataset()
        {
            XYMultipleSeriesDataset dataset = new XYMultipleSeriesDataset();
            const int nr = 10;
            Random    r  = new Random();

            for (int i = 0; i < SERIES_NR; i++)
            {
                CategorySeries series = new CategorySeries("Demo series " + (i + 1));
                for (int k = 0; k < nr; k++)
                {
                    series.Add(100 + r.Next() % 100);
                }
                dataset.AddSeries(series.ToXYSeries());
            }
            return(dataset);
        }
Example #7
0
        protected XYMultipleSeriesDataset BuildBarDataset(String[] title, IList <double[]> values)
        {
            XYMultipleSeriesDataset dataset = new XYMultipleSeriesDataset();
            int length = title.Length;

            for (int i = 0; i < length; i++)
            {
                CategorySeries series       = new CategorySeries(title[i]);
                double[]       v            = values[i];
                int            seriesLength = v.Length;
                for (int k = 0; k < seriesLength; k++)
                {
                    series.Add(v[k]);
                }
                dataset.AddSeries(series.ToXYSeries());
            }
            return(dataset);
        }
Example #8
0
        /// <summary>
        /// Builds a bar multiple series dataset using the provided values.
        /// </summary>
        /// <param name="titles"> the series titles </param>
        /// <param name="values"> the values </param>
        /// <returns> the XY multiple bar dataset </returns>
        protected internal virtual XYMultipleSeriesDataset buildBarDataset(string[] titles, IList <double[]> values)
        {
            XYMultipleSeriesDataset dataset = new XYMultipleSeriesDataset();
            int length = titles.Length;

            for (int i = 0; i < length; i++)
            {
                CategorySeries series       = new CategorySeries(titles[i]);
                double[]       v            = values[i];
                int            seriesLength = v.Length;
                for (int k = 0; k < seriesLength; k++)
                {
                    series.add(v[k]);
                }
                dataset.addSeries(series.toXYSeries());
            }
            return(dataset);
        }
Example #9
0
 protected override void OnRestoreInstanceState(Bundle savedState)
 {
     base.OnRestoreInstanceState(savedState);
     mSeries   = (CategorySeries)savedState.GetSerializable("current_series");
     mRenderer = (DefaultRenderer)savedState.GetSerializable("current_renderer");
 }
	  /// <summary>
	  /// Builds a bar multiple series dataset using the provided values.
	  /// </summary>
	  /// <param name="titles"> the series titles </param>
	  /// <param name="values"> the values </param>
	  /// <returns> the XY multiple bar dataset </returns>
	  protected internal virtual XYMultipleSeriesDataset buildBarDataset(string[] titles, IList<double[]> values)
	  {
		XYMultipleSeriesDataset dataset = new XYMultipleSeriesDataset();
		int length = titles.Length;
		for (int i = 0; i < length; i++)
		{
		  CategorySeries series = new CategorySeries(titles[i]);
		  double[] v = values[i];
		  int seriesLength = v.Length;
		  for (int k = 0; k < seriesLength; k++)
		  {
			series.add(v[k]);
		  }
		  dataset.addSeries(series.toXYSeries());
		}
		return dataset;
	  }
	  /// <summary>
	  /// Builds a category series using the provided values.
	  /// </summary>
	  /// <param name="titles"> the series titles </param>
	  /// <param name="values"> the values </param>
	  /// <returns> the category series </returns>
	  protected internal virtual CategorySeries buildCategoryDataset(string title, double[] values)
	  {
		CategorySeries series = new CategorySeries(title);
		int k = 0;
		foreach (double value in values)
		{
		  series.add("Project " + ++k, value);
		}

		return series;
	  }
 public static void AddCategoriesSeries(CategorySeries series)
 {
     _categorySeries.Add(series);
 }