public virtual void onClick(View v) { string seriesTitle = "Series " + (outerInstance.mDataset.SeriesCount + 1); // create a new series of data XYSeries series = new XYSeries(seriesTitle); outerInstance.mDataset.addSeries(series); outerInstance.mCurrentSeries = series; // create a new renderer for the new series XYSeriesRenderer renderer = new XYSeriesRenderer(); outerInstance.mRenderer.addSeriesRenderer(renderer); // set some renderer properties renderer.PointStyle = PointStyle.CIRCLE; renderer.FillPoints = true; renderer.DisplayChartValues = true; renderer.DisplayChartValuesDistance = 10; outerInstance.mCurrentRenderer = renderer; outerInstance.SeriesWidgetsEnabled = true; outerInstance.mCurrentSeries.add(1, 2); outerInstance.mCurrentSeries.add(2, 3); outerInstance.mCurrentSeries.add(3, 0.5); outerInstance.mCurrentSeries.add(4, -1); outerInstance.mCurrentSeries.add(5, 2.5); outerInstance.mCurrentSeries.add(6, 3.5); outerInstance.mCurrentSeries.add(7, 2.85); outerInstance.mCurrentSeries.add(8, 3.25); outerInstance.mCurrentSeries.add(9, 4.25); outerInstance.mCurrentSeries.add(10, 3.75); outerInstance.mRenderer.Range = new double[] { 0.5, 10.5, -1.5, 4.75 }; outerInstance.mChartView.repaint(); }
protected internal override void onRestoreInstanceState(Bundle savedState) { base.onRestoreInstanceState(savedState); // restore the current data, for instance when changing the screen // orientation mDataset = (XYMultipleSeriesDataset)savedState.getSerializable("dataset"); mRenderer = (XYMultipleSeriesRenderer)savedState.getSerializable("renderer"); mCurrentSeries = (XYSeries)savedState.getSerializable("current_series"); mCurrentRenderer = (XYSeriesRenderer)savedState.getSerializable("current_renderer"); }
protected internal override void onRestoreInstanceState(Bundle savedState) { base.onRestoreInstanceState(savedState); // restore the current data, for instance when changing the screen // orientation mDataset = (XYMultipleSeriesDataset) savedState.getSerializable("dataset"); mRenderer = (XYMultipleSeriesRenderer) savedState.getSerializable("renderer"); mCurrentSeries = (XYSeries) savedState.getSerializable("current_series"); mCurrentRenderer = (XYSeriesRenderer) savedState.getSerializable("current_renderer"); }
/// <summary> /// Executes the chart demo. /// </summary> /// <param name="context"> the context </param> /// <returns> the built intent </returns> public override Intent execute(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.Margins = 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.LTGRAY); renderer.XLabels = 7; renderer.YLabels = 0; renderer.ShowGrid = false; return(ChartFactory.getBubbleChartIntent(context, series, renderer, "Project tickets")); }
public virtual void onClick(View v) { string seriesTitle = "Series " + (outerInstance.mDataset.SeriesCount + 1); // create a new series of data XYSeries series = new XYSeries(seriesTitle); outerInstance.mDataset.addSeries(series); outerInstance.mCurrentSeries = series; // create a new renderer for the new series XYSeriesRenderer renderer = new XYSeriesRenderer(); outerInstance.mRenderer.addSeriesRenderer(renderer); // set some renderer properties renderer.PointStyle = PointStyle.CIRCLE; renderer.FillPoints = true; renderer.DisplayChartValues = true; renderer.DisplayChartValuesDistance = 10; outerInstance.mCurrentRenderer = renderer; outerInstance.SeriesWidgetsEnabled = true; outerInstance.mChartView.repaint(); }
/// <summary> /// Executes the chart demo. /// </summary> /// <param name="context"> the context </param> /// <returns> the built intent </returns> public override Intent execute(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.Margins = 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.LTGRAY); renderer.XLabels = 7; renderer.YLabels = 0; renderer.ShowGrid = false; return ChartFactory.getBubbleChartIntent(context, series, renderer, "Project tickets"); }
public virtual void onClick(View v) { string seriesTitle = "Series " + (outerInstance.mDataset.SeriesCount + 1); // create a new series of data XYSeries series = new XYSeries(seriesTitle); outerInstance.mDataset.addSeries(series); outerInstance.mCurrentSeries = series; // create a new renderer for the new series XYSeriesRenderer renderer = new XYSeriesRenderer(); outerInstance.mRenderer.addSeriesRenderer(renderer); // set some renderer properties renderer.PointStyle = PointStyle.CIRCLE; renderer.FillPoints = true; renderer.DisplayChartValues = true; renderer.DisplayChartValuesDistance = 10; outerInstance.mCurrentRenderer = renderer; outerInstance.SeriesWidgetsEnabled = true; outerInstance.mChartView.repaint(); }
public virtual void onClick(View v) { string seriesTitle = "Series " + (outerInstance.mDataset.SeriesCount + 1); // create a new series of data XYSeries series = new XYSeries(seriesTitle); outerInstance.mDataset.addSeries(series); outerInstance.mCurrentSeries = series; // create a new renderer for the new series XYSeriesRenderer renderer = new XYSeriesRenderer(); outerInstance.mRenderer.addSeriesRenderer(renderer); // set some renderer properties renderer.PointStyle = PointStyle.CIRCLE; renderer.FillPoints = true; renderer.DisplayChartValues = true; renderer.DisplayChartValuesDistance = 10; outerInstance.mCurrentRenderer = renderer; outerInstance.SeriesWidgetsEnabled = true; outerInstance.mCurrentSeries.add(1, 2); outerInstance.mCurrentSeries.add(2, 3); outerInstance.mCurrentSeries.add(3, 0.5); outerInstance.mCurrentSeries.add(4, -1); outerInstance.mCurrentSeries.add(5, 2.5); outerInstance.mCurrentSeries.add(6, 3.5); outerInstance.mCurrentSeries.add(7, 2.85); outerInstance.mCurrentSeries.add(8, 3.25); outerInstance.mCurrentSeries.add(9, 4.25); outerInstance.mCurrentSeries.add(10, 3.75); outerInstance.mRenderer.Range = new double[] {0.5, 10.5, -1.5, 4.75}; outerInstance.mChartView.repaint(); }