Ejemplo n.º 1
0
        public ScatterChartPage()
        {
            InitializeComponent();

            var entries = new List <EntryChart>();

            entries.Add(new EntryChart(0, 5));
            entries.Add(new EntryChart(1, 7));
            entries.Add(new EntryChart(2, 10));
            entries.Add(new EntryChart(3, 3));
            entries.Add(new EntryChart(4, 1));
            entries.Add(new EntryChart(5, 7));
            entries.Add(new EntryChart(6, 2));

            var labels = new List <string>();

            labels.Add("col1");
            labels.Add("col2");
            labels.Add("col3");
            labels.Add("col4");
            labels.Add("col5");
            labels.Add("col6");
            labels.Add("col7");

            var dataSet4 = new ScatterDataSet(entries, "Scatter DataSet")
            {
            };
            var data4 = new ScatterChartData(new List <IScatterDataSet>()
            {
                dataSet4
            });

            var dataSet5 = new ScatterDataSet(entries, "Bar DataSet")
            {
            };
            var data5 = new ScatterChartData(new List <IScatterDataSet>()
            {
                dataSet5
            });

            scatterChart.ChartData  = data4;
            scatterChart2.ChartData = data5;
            scatterChart.XAxis.AxisValueFormatter = new TextByIndexXAxisFormatter(labels);
        }
Ejemplo n.º 2
0
        protected override void OnAppearing()
        {
            base.OnAppearing();

            var entries = new List <EntryChart>();

            entries.Add(new EntryChart(0, 5));
            entries.Add(new EntryChart(1, 7));
            entries.Add(new EntryChart(2, 10));
            entries.Add(new EntryChart(3, 3));
            entries.Add(new EntryChart(4, 1));
            entries.Add(new EntryChart(5, 7));
            entries.Add(new EntryChart(6, 2));

            var labels = new List <string>();

            labels.Add("col1");
            labels.Add("col2");
            labels.Add("col3");
            labels.Add("col4");
            labels.Add("col5");
            labels.Add("col6");
            labels.Add("col7");

            var dataSet4 = new ScatterDataSet(entries, "Scatter DataSet")
            {
            };
            var data4 = new ScatterChartData(new List <IScatterDataSet>()
            {
                dataSet4
            });

            var dataSet5 = new ScatterDataSet(entries, "Bar DataSet")
            {
            };
            var data5 = new ScatterChartData(new List <IScatterDataSet>()
            {
                dataSet5
            });

            scatterChart.ChartData  = data4;
            scatterChart2.ChartData = data5;
            scatterChart.XAxis.AxisValueFormatter = new TextByIndexXAxisFormatter(labels);
        }
        private void OnIntializeDataSetScatter(Widget.Charts.Models.ScatterChart.IScatterDataSet source, ScatterDataSet original)
        {
            OnSettingsLineScatterCandleRadarDataSet(source, original);

            if (source.IF_GetShapeSize().HasValue)
            {
                original.ScatterShapeSize = (source.IF_GetShapeSize().Value);
            }

            if (source.IF_GetScatterShapeHoleColor().HasValue)
            {
                original.ScatterShapeHoleColor = (source.IF_GetScatterShapeHoleColor().Value.ToAndroid());
            }

            if (source.IF_GetScatterShapeHoleRadius().HasValue)
            {
                original.ScatterShapeHoleRadius = (source.IF_GetScatterShapeHoleRadius().Value);
            }
        }