Пример #1
0
 public Function_Trend()
 {
     // This call is required by the Windows Form Designer.
     InitializeComponent();
     area1.FillSampleValues();
     for (int i = 0; i < area1.Count; i++)
     {
         area1.XValues[i] += 1;
     }
     trendFunction1.Recalculate();
 }
Пример #2
0
        public Export_SVG()
        {
            // This call is required by the Windows Form Designer.
            InitializeComponent();

            line1.FillSampleValues(10);
            area1.FillSampleValues(10);
        }
        public Area_Gradient()
        {
            // This call is required by the Windows Form Designer.
            InitializeComponent();

            areaSeries1.FillSampleValues(10);
            areaSeries1.Gradient.Visible     = true;
            areaSeries1.Gradient.StartColor  = Color.Red;
            areaSeries1.Gradient.MiddleColor = Color.Blue;
            areaSeries1.Gradient.EndColor    = Color.Green;
            areaSeries1.AreaLines.Visible    = false;

            trackBar1.Value = areaSeries1.Transparency;
        }
        public Axis_MinorGrid()
        {
            // This call is required by the Windows Form Designer.
            InitializeComponent();

            areaSeries1.FillSampleValues(5);

            tChart1.Axes.DrawBehind               = false;
            tChart1.Axes.Bottom.MinorGrid.Color   = Color.White;
            tChart1.Axes.Bottom.MinorGrid.Style   = System.Drawing.Drawing2D.DashStyle.DashDotDot;
            tChart1.Axes.Bottom.MinorGrid.Visible = true;
            tChart1.Axes.Bottom.MinorTickCount    = 3;

            buttonPen1.Pen = tChart1.Axes.Bottom.MinorGrid;
        }
Пример #5
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            var tChart1 = new Steema.TeeChart.TChart(ApplicationContext);

            tChart1.Panel.Transparent  = true;
            tChart1.Header.Text        = "Multiple series made with Xamarin.Android";
            tChart1.Zoom.Style         = Steema.TeeChart.ZoomStyles.FullChart;
            tChart1.Axes.Top.Visible   = false;
            tChart1.ContentDescription = "MultiChart";

            var myTheme = new Steema.TeeChart.Themes.BlackIsBackTheme(tChart1.Chart);

            myTheme.Apply();

            var area1 = new Steema.TeeChart.Styles.Area(tChart1.Chart);

            area1.FillSampleValues();
            area1.Gradient.Visible      = true;
            area1.Gradient.StartColor   = area1.Color;
            area1.Gradient.Transparency = 40;
            area1.Transparency          = area1.Gradient.Transparency;

            var bar1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);

            bar1.FillSampleValues();
            bar1.Brush.Transparency = 30;
            bar1.Marks.Visible      = false;
            bar1.Color     = Steema.TeeChart.Themes.Theme.OnBlackPalette[1];
            bar1.HorizAxis = Steema.TeeChart.Styles.HorizontalAxis.Top;

            var line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);

            line1.FillSampleValues();
            line1.Color = Steema.TeeChart.Themes.Theme.OnBlackPalette[3];

            SetContentView(tChart1);
        }
        public MainPage()
        {
            InitializeComponent();

            AreaLineChart = new ChartView();
            area1         = new Steema.TeeChart.Styles.Area();
            AreaLineChart.Chart.Series.Add(area1);
            colorLine1  = new Steema.TeeChart.Tools.ColorLine();
            annotation1 = new Steema.TeeChart.Tools.Annotation();

            AreaLineChart.Chart.Panning.Allow = ScrollModes.None;

            AreaLineChart.Chart.Panel.Gradient.Visible = false;
            AreaLineChart.Chart.Panel.Color            = Color.White;
            AreaLineChart.Chart.Walls.Back.Visible     = false;
            AreaLineChart.Chart.Header.Visible         = false;

            AreaLineChart.Chart.Legend.Visible = false;
            AreaLineChart.Chart.Aspect.View3D  = false;
            area1.AreaBrush.Color = Color.FromRgb(192, 192, 255);

            AreaLineChart.Chart.Axes.Bottom.Labels.Font.Brush.Color = Color.FromRgb(128, 128, 128);
            AreaLineChart.Chart.Axes.Bottom.Labels.Font.Size        = 18;
            AreaLineChart.Chart.Axes.Left.Labels.Font.Brush.Color   = Color.FromRgb(128, 128, 128);
            AreaLineChart.Chart.Axes.Left.Labels.Font.Size          = 18;
            AreaLineChart.Chart.Axes.Left.AxisPen.Visible           = false;
            AreaLineChart.Chart.Axes.Left.MaximumOffset             = 5;
            AreaLineChart.Chart.Axes.Left.MinimumOffset             = 5;
            area1.AreaBrush.Color   = Color.FromRgb(192, 192, 255);
            area1.AreaBrush.Solid   = true;
            area1.AreaBrush.Visible = true;
            area1.AreaLines.Visible = false;
            area1.Brush.Color       = Color.FromRgb(192, 192, 255);
            area1.Brush.Solid       = true;
            area1.Color             = Color.FromRgb(192, 192, 255);
            area1.LinePen.Width     = 6;
            area1.LinePen.Color     = Color.Navy;

            AreaLineChart.Chart.Axes.Left.Ticks.Length   = 10;
            AreaLineChart.Chart.Axes.Bottom.Ticks.Length = 10;

            AreaLineChart.Chart.Axes.Left.Increment = 100;

            //
            // colorLine1
            //
            AreaLineChart.Chart.Tools.Add(colorLine1);
            colorLine1.Axis       = AreaLineChart.Chart.Axes.Bottom;
            colorLine1.Pen.Color  = Color.Navy;
            colorLine1.Pen.Width  = 6;
            colorLine1.Pen.Style  = Steema.TeeChart.Drawing.DashStyle.Dot;
            colorLine1.Value      = 10D;
            colorLine1.DragLine  += ColorLine1_DragLine;
            colorLine1.DrawBehind = false;
            colorLine1.ColorLineClickTolerance = 15;

            annotation1.Shape.Color          = Color.Navy;
            annotation1.Shape.Font.Color     = Color.White;
            annotation1.Shape.Font.Size      = 25;
            annotation1.Shape.Pen.Visible    = false;
            annotation1.Shape.BorderRound    = 15;
            annotation1.Shape.BevelInner     = Steema.TeeChart.Drawing.BevelStyles.None;
            annotation1.Shape.BevelOuter     = Steema.TeeChart.Drawing.BevelStyles.None;
            annotation1.Shape.Shadow.Visible = false;

            annotation1.TextAlign       = TextAlignment.Center;
            annotation1.Shape.TextAlign = TextAlignment.Center;

            AreaLineChart.WidthRequest  = 650;
            AreaLineChart.HeightRequest = 350;

            AreaLineChart.Chart.AfterDraw += Chart_AfterDraw;

            AreaLineChart.Chart.Panel.Brush.Solid = true;
            area1.Marks.Visible = false;

            AreaLineChart.Chart.Tools.Add(annotation1);
            annotation1.Active = false;
            area1.FillSampleValues(100);


            Content = new StackLayout
            {
                Children =
                {
                    AreaLineChart
                },
                VerticalOptions   = LayoutOptions.CenterAndExpand,
                HorizontalOptions = LayoutOptions.CenterAndExpand,
            };
        }