Ejemplo n.º 1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            chart = new Steema.TeeChart.TChart(this.ApplicationContext);

            chart.Zoom.Style = Steema.TeeChart.ZoomStyles.FullChart;
            Steema.TeeChart.Themes.BlackIsBackTheme myTheme = new Steema.TeeChart.Themes.BlackIsBackTheme(chart.Chart);
            myTheme.Apply();

            Bundle extras     = Intent.Extras;
            int    seriesType = extras.GetInt("SeriesPosition");

            Type tmp = (Type)Steema.TeeChart.Utils.SeriesTypesOf[seriesType];

            Steema.TeeChart.Styles.Series series;

            //Some series can not work without a parent chart due to internal structure.
            if (tmp.Name == "TreeMap")
            {
                series = new Steema.TeeChart.Styles.TreeMap(chart.Chart);
            }
            else if (tmp.Name == "PolarGrid")
            {
                series = new Steema.TeeChart.Styles.PolarGrid(chart.Chart);
            }
            else
            {
                series = chart.Series.Add(tmp);
            }

            series.FillSampleValues();

            chart.Aspect.View3D = Needs3D(chart[0]);
            //chart.Panel.Transparent = true;
            if (chart[0] is Steema.TeeChart.Styles.Pie)
            {
                Steema.TeeChart.Styles.Pie pie = (Steema.TeeChart.Styles.Pie)chart[0];
                pie.EdgeStyle    = Steema.TeeChart.Drawing.EdgeStyles.Flat;
                pie.BevelPercent = 30;

                chart.Legend.Visible   = false;
                chart.Aspect.Elevation = 300;
            }

            SetContentView(chart);
        }
Ejemplo n.º 2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

              chart = new Steema.TeeChart.TChart(this.ApplicationContext);

              chart.Zoom.Style = Steema.TeeChart.ZoomStyles.FullChart;
              Steema.TeeChart.Themes.BlackIsBackTheme myTheme = new Steema.TeeChart.Themes.BlackIsBackTheme(chart.Chart);
              myTheme.Apply();

              Bundle extras = Intent.Extras;
              int seriesType = extras.GetInt("SeriesPosition");

              Type tmp = (Type)Steema.TeeChart.Utils.SeriesTypesOf[seriesType];
              Steema.TeeChart.Styles.Series series;

              //Some series can not work without a parent chart due to internal structure.
              if (tmp.Name == "TreeMap")
              {
            series = new Steema.TeeChart.Styles.TreeMap(chart.Chart);
              }
              else if (tmp.Name == "PolarGrid")
              {
            series = new Steema.TeeChart.Styles.PolarGrid(chart.Chart);
              }
              else
              {
            series = chart.Series.Add(tmp);
              }

              series.FillSampleValues();

              chart.Aspect.View3D = Needs3D(chart[0]);
              //chart.Panel.Transparent = true;
              if (chart[0] is Steema.TeeChart.Styles.Pie)
              {
            Steema.TeeChart.Styles.Pie pie = (Steema.TeeChart.Styles.Pie)chart[0];
            pie.EdgeStyle = Steema.TeeChart.Drawing.EdgeStyles.Flat;
            pie.BevelPercent = 30;

            chart.Legend.Visible = false;
            chart.Aspect.Elevation = 300;
              }

              SetContentView(chart);
        }
Ejemplo n.º 3
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            chart = new Steema.TeeChart.TChart(ApplicationContext);

            chart.Zoom.Style = Steema.TeeChart.ZoomStyles.Classic;
            var myTheme = new Steema.TeeChart.Themes.BlackIsBackTheme(chart.Chart);

            myTheme.Apply();

            Bundle extras     = Intent.Extras;
            int    seriesType = extras.GetInt("SeriesPosition");

            var tmp = Steema.TeeChart.Utils.SeriesTypesOf [seriesType];

            Steema.TeeChart.Styles.Series series;

            this.Title = tmp.ToString().Replace("Steema.TeeChart.Styles.", "");

            //Some series can not work without a parent chart due to internal structure.
            if (tmp.Name == "TreeMap")
            {
                series = new Steema.TeeChart.Styles.TreeMap(chart.Chart);
            }
            else if (tmp.Name == "PolarGrid")
            {
                series = new Steema.TeeChart.Styles.PolarGrid(chart.Chart);
            }
            else
            {
                series = chart.Series.Add(tmp);
            }

            series.FillSampleValues();

            chart.Aspect.View3D = Needs3D(chart[0]);
            //chart.Panel.Transparent = true;

            if (chart[0] is Steema.TeeChart.Styles.Circular)
            {
                (chart[0] as Steema.TeeChart.Styles.Circular).Circled = true;
            }

            if (chart[0] is Steema.TeeChart.Styles.Pie)
            {
                var pie = (Steema.TeeChart.Styles.Pie)chart[0];

                pie.Marks.Visible = false;
                pie.BevelPercent  = 25;
                pie.Pen.Visible   = false;
                pie.EdgeStyle     = Steema.TeeChart.Drawing.EdgeStyles.Flat;
                pie.Circled       = true;
                pie.FillSampleValues(6);
                chart.Legend.Visible      = true;
                chart.Legend.Font.Size    = 15;
                chart.Legend.Transparency = 30;
                chart.Legend.Alignment    = Steema.TeeChart.LegendAlignments.Bottom;
                chart.Aspect.View3D       = true;
                chart.Aspect.VertOffset   = -20;
                chart.Aspect.Elevation    = 300;

                if (!(pie is Steema.TeeChart.Styles.Donut))
                {
                    chart.Aspect.Chart3DPercent = 30;
                    pie.BevelPercent            = 15;
                    chart.Legend.Transparent    = true;
                    chart.Legend.Font.Size      = 16;
                }

                chart.Header.Text    = "Touch a slice to explode it";
                chart.Legend.Visible = false;
            }

            if (chart[0] is Steema.TeeChart.Styles.Gantt || chart[0] is Steema.TeeChart.Styles.Funnel)
            {
                chart.Legend.Alignment = Steema.TeeChart.LegendAlignments.Bottom;
            }

            if (chart[0] is Steema.TeeChart.Styles.Custom3DPalette)
            {
                if (!(chart[0] is Steema.TeeChart.Styles.Contour) &&
                    !(chart[0] is Steema.TeeChart.Styles.ColorGrid) &&
                    !(chart[0] is Steema.TeeChart.Styles.Ternary) &&
                    !(chart[0] is Steema.TeeChart.Styles.BubbleCloud))
                {
                    chart.Legend.Alignment = Steema.TeeChart.LegendAlignments.Bottom;
                    chart.Legend.Font.Size = 30;
                    chart.Legend.Visible   = false;
                    chart.Header.Text      = "Drag to rotate";
                    chart.Header.Font.Size = 30;
                    chart.Walls.Visible    = false;

                    if (chart[0] is Steema.TeeChart.Styles.TriSurface)
                    {
                        chart.Aspect.Chart3DPercent = 30;
                    }
                    else
                    {
                        chart.Axes.Bottom.Increment = 1;

                        chart.Aspect.Orthogonal     = false;
                        chart.Aspect.Chart3DPercent = 70;
                        chart.Aspect.Rotation       = 310;
                        chart.Aspect.Zoom           = 70;
                        chart.Aspect.Perspective    = 100;
                    }

                    chart.Tools.Add(new Steema.TeeChart.Tools.Rotate());
                }
                else if (chart[0] is Steema.TeeChart.Styles.Contour)
                {
                    ((Steema.TeeChart.Styles.Custom3DPalette)chart[0]).Pen.Width = 3;
                    ((Steema.TeeChart.Styles.Contour)chart[0]).FillLevels        = true;
                }
                else if (chart[0] is Steema.TeeChart.Styles.BubbleCloud)
                {
                    chart.Legend.Alignment = Steema.TeeChart.LegendAlignments.Bottom;
                }

                ((Steema.TeeChart.Styles.Custom3DPalette)chart[0]).UseColorRange = false;
                ((Steema.TeeChart.Styles.Custom3DPalette)chart[0]).UsePalette    = true;
                ((Steema.TeeChart.Styles.Custom3DPalette)chart[0]).PaletteStyle  = Steema.TeeChart.Styles.PaletteStyles.Strong;
            }

            if ((chart[0] is Steema.TeeChart.Styles.Pie) ||
                (chart[0] is Steema.TeeChart.Styles.CircularGauge) ||
                (chart[0] is Steema.TeeChart.Styles.CustomGauge))
            {
                chart.ClickSeries += chart_ClickSeries;
            }
            else
            {
                chart.ClickSeries -= chart_ClickSeries;
            }

            //if (((chart[0] is Steema.TeeChart.Styles.Line) || (chart[0] is Steema.TeeChart.Styles.Points))
            //    && !(chart[0] is Steema.TeeChart.Styles.Bubble))
            //{
            //  chart.Header.Text = "Touch series for tool tip";
            //  chart.ClickSeries += chart_ClickSeries;
            //}
            //else
            //{
            //  chart.ClickSeries -= chart_ClickSeries;
            //}

            SetContentView(chart);
        }