Refresh of Pocket PC Version

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
FH Nürnberg
Newbie
Newbie
Posts: 8
Joined: Thu Nov 18, 2010 12:00 am

Refresh of Pocket PC Version

Post by FH Nürnberg » Tue May 17, 2011 7:24 am

Hallo, I have a problem with the refresh of an chart. After I fill the chart with new data the old one are still visible. The operator chart.Refresh() doesn`t work.
The only workaround is to minimize the chart, original Size => chart Size(0, 0) => original Size, to draw the new one correctly.

I found in the Bug List
[TF02013525]
TeeChart.Pocket.dll Chart not resizing
correctly. Fixed.

And I use the Version "TeeChartNET2010VSNET2008_4.1.2011.04192.exe".

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Refresh of Pocket PC Version

Post by Yeray » Wed May 18, 2011 1:36 pm

Hello ,

I'm trying to reproduce it with the following code but it seems to work as expected.

Code: Select all

        Steema.TeeChart.Styles.Line line1;
        private void InitializeChart()
        {
            tChart1.Legend.Visible = false;
            tChart1.Aspect.View3D = false;

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

            tChart1.DoubleClick += new EventHandler(tChart1_DoubleClick);
        }

        void tChart1_DoubleClick(object sender, EventArgs e)
        {
            Random rnd = new Random();
            tChart1.AutoRepaint = false;
            line1.Clear();
            line1.Add(rnd.Next(100));
            for (int i = 1; i < 20; i++)
            {
                line1.Add(line1.YValues.Value[i-1] + rnd.Next(10) - 5);
            }
            tChart1.AutoRepaint = true;
            tChart1.Refresh();
        }
Could you please modify the code above so we can reproduce the problem here? Or could you please arrange a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

FH Nürnberg
Newbie
Newbie
Posts: 8
Joined: Thu Nov 18, 2010 12:00 am

Re: Refresh of Pocket PC Version

Post by FH Nürnberg » Thu May 19, 2011 1:06 pm

Hallo, I find the wrong code.

Code: Select all

        Steema.TeeChart.Styles.Line line1;
        private void InitializeChart()
        {
            tChart1.Legend.Visible = false;
            tChart1.Aspect.View3D = false;

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

            tChart1.DoubleClick += new EventHandler(tChart1_DoubleClick);
        }

        void tChart1_DoubleClick(object sender, EventArgs e)
        {
            tChart1.Clear();

            tChart1.Aspect.View3D = false;
            tChart1.Aspect.ZOffset = 0;

            tChart1.Axes.Bottom.AxisPen.Color = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            tChart1.Axes.Bottom.Increment = 0.041666666666666664 / 3600;

            tChart1.Axes.Bottom.Labels.DateTimeFormat = "HH:mm:ss";

            tChart1.Axes.Bottom.Labels.Font.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            tChart1.Axes.Bottom.Labels.Font.Name = "Trebuchet MS";
            tChart1.Axes.Bottom.MaximumOffset = 5;
            tChart1.Axes.Bottom.MinimumOffset = 5;
            tChart1.Axes.Bottom.Automatic = true;

            tChart1.Axes.Bottom.Title.Font.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            //tChart1.Axes.Bottom.Title.Transparent = true;

            //tChart1.Axes.Depth.Title.Transparent = true;

            //tChart1.Axes.DepthTop.Title.Transparent = true;

            tChart1.Axes.Left.AxisPen.Color = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            tChart1.Axes.Left.AxisPen.Width = 0;

            tChart1.Axes.Left.Labels.Font.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            tChart1.Axes.Left.Labels.Font.Name = "Trebuchet MS";
            tChart1.Axes.Left.Labels.Style = Steema.TeeChart.AxisLabelStyle.Value;
            tChart1.Axes.Left.MaximumOffset = 5;
            tChart1.Axes.Left.MinimumOffset = 5;

            tChart1.Axes.Left.Title.Font.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            //tChart1.Axes.Left.Title.Transparent = true;

            tChart1.Axes.Right.AxisPen.Color = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));

            tChart1.Axes.Right.Grid.Color = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));

            tChart1.Axes.Right.MinorGrid.Color = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            tChart1.Axes.Right.MinorGrid.Visible = true;

            tChart1.Axes.Right.MinorTicks.Color = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));

            tChart1.Axes.Right.Title.Font.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            //tChart1.Axes.Right.Title.Transparent = true;
            tChart1.Axes.Right.Visible = false;

            tChart1.Axes.Top.Automatic = false;
            tChart1.Axes.Top.AutomaticMaximum = false;
            tChart1.Axes.Top.AutomaticMinimum = false;

            tChart1.Axes.Top.AxisPen.Color = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));

            tChart1.Axes.Top.Labels.Font.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            tChart1.Axes.Top.Maximum = 0;
            tChart1.Axes.Top.Minimum = 0;

            //tChart1.Axes.Top.Title.Transparent = true;
            tChart1.Axes.Top.Visible = false;
            //tChart1.BackColor = System.Drawing.Color.Transparent;

            tChart1.Header.AdjustFrame = false;
            tChart1.Header.Alignment = System.Drawing.StringAlignment.Near;
            tChart1.Header.Bottom = 30;

            tChart1.Header.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            tChart1.Header.CustomPosition = true;

            tChart1.Header.Font.Bold = true;

            tChart1.Header.Font.Brush.Color = System.Drawing.Color.White;
            tChart1.Header.Font.Name = "Trebuchet MS";
            tChart1.Header.Left = 23;
            tChart1.Header.Lines = new string[] {
    ""};
            tChart1.Header.Right = 212;
            tChart1.Header.Top = 15;

            tChart1.Legend.Bevel.ColorOne = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));

            tChart1.Legend.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));

            //tChart1.Legend.Brush.Gradient.Transparency = 70;

            tChart1.Legend.DividingLines.Width = 0;

            tChart1.Legend.Font.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(202)))), ((int)(((byte)(202)))), ((int)(((byte)(0)))));
            tChart1.Legend.FontSeriesColor = true;
            tChart1.Legend.LegendStyle = Steema.TeeChart.LegendStyles.Series;

            tChart1.Legend.Pen.Color = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            //tChart1.Legend.Pen.Transparency = 80;
            tChart1.Legend.Pen.Visible = false;

            tChart1.Legend.Shadow.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));

            //tChart1.Legend.Shadow.Brush.Gradient.Transparency = 70;
            tChart1.Legend.Shadow.Visible = false;

            tChart1.Legend.Symbol.Width = 25;

            tChart1.Legend.Title.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));

            //tChart1.Legend.Title.Brush.Gradient.Transparency = 80;

            tChart1.Legend.Title.Font.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
            tChart1.Legend.Title.Font.Name = "Trebuchet MS";
            tChart1.Legend.Title.Lines = new string[] {
    "Legende"};

            tChart1.Legend.Title.Shadow.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(169)))), ((int)(((byte)(169)))), ((int)(((byte)(169)))));

            //tChart1.Legend.Title.Shadow.Brush.Gradient.Transparency = 80;
            tChart1.Legend.Title.Visible = true;
            tChart1.Legend.TopLeftPos = 0;

            tChart1.Panel.Bevel.ColorOne = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))));
            tChart1.Panel.Bevel.ColorTwo = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))));
            tChart1.Panel.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None;

            tChart1.Panel.Brush.Color = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))));
            tChart1.Panel.Brush.ForegroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(106)))), ((int)(((byte)(106)))), ((int)(((byte)(106)))));

            tChart1.Panel.Brush.Gradient.Direction = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
            tChart1.Panel.Brush.Gradient.EndColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
            tChart1.Panel.Brush.Gradient.MiddleColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
            tChart1.Panel.Brush.Gradient.StartColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));

            tChart1.Panel.Brush.Gradient.Style.Direction = Steema.TeeChart.Drawing.PathGradientMode.Radial;
            tChart1.Panel.Brush.Gradient.Visible = false;
            tChart1.Panel.Brush.Solid = false;
            tChart1.Panel.Brush.Style = System.Drawing.Drawing2D.HatchStyle.BackwardDiagonal;
            tChart1.Panel.MarginBottom = 18;
            tChart1.Panel.MarginLeft = 0;
            tChart1.Panel.MarginRight = 5;
            tChart1.Panel.MarginTop = 36;
            tChart1.Panel.MarginUnits = Steema.TeeChart.PanelMarginUnits.Pixels;

            tChart1.Panel.Pen.Color = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
            tChart1.Panel.Pen.Visible = true;

            tChart1.Panning.Allow = Steema.TeeChart.ScrollModes.None;
            tChart1.Panning.MouseButton = System.Windows.Forms.MouseButtons.Left;
            tChart1.TabIndex = 0;
            tChart1.Walls.Back.Visible = false;
            tChart1.Walls.Bottom.Visible = false;

            tChart1.Zoom.Allow = false;


            // 2. Function


            tChart1.Aspect.View3D = false; // 3D ausschalten

            tChart1.Axes.Bottom.AxisPen.Color = Color.White; // Farbe Achse unten
            tChart1.Axes.Bottom.Labels.Font.Brush.Color = Color.White; // Farbe Achsenbeschriftung unten

            tChart1.Axes.Left.AxisPen.Color = Color.White;  // Farbe Achse links
            tChart1.Axes.Left.Labels.Font.Brush.Color = Color.White;
            tChart1.Axes.Left.Title.Font.Brush.Color = Color.White; 

/*          // ERROR CODE
  
            tChart1.Panel.Color = Color.Gray; 
            tChart1.Panel.Brush.Gradient.Visible = false;
            tChart1.Panel.Brush.Visible = false;
            tChart1.Walls.Back.Visible = false;
            tChart1.Walls.Bottom.Visible = false;
*/
            
            line1.LinePen.Color = Color.Gray;
            line1.LinePen.Width = 2;
            line1.Brush.Visible = false;
            line1.ColorEach = false;
            line1.Dark3D = false;

            // Meßdaten erfassen
            tChart1.Series.Clear();


            //line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
            tChart1.Series.Add(line1);


            Random rnd = new Random();
            tChart1.AutoRepaint = false;
            line1.Clear();
            line1.Add(rnd.Next(100));
            for (int i = 1; i < 20; i++)
            {
                line1.Add(line1.YValues.Value[i - 1] + rnd.Next(10) - 5);
            }
            tChart1.AutoRepaint = true;
            tChart1.Refresh();
        }
The error is
tChart1.Panel.Brush.Gradient.Visible = false;
tChart1.Panel.Brush.Visible = false;
tChart1.Walls.Back.Visible = false;
tChart1.Walls.Bottom.Visible = false;


Note: In my programm I change the chart typ (line / bar ...) and the color ...

The wrong code is not necessary for me.

Thank you

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Refresh of Pocket PC Version

Post by Yeray » Fri May 20, 2011 1:36 pm

Hello,

I understand you've found where the problem was so you've been able to workaround it, isn't it?
If you have any remaining problem/doubt, please don't hesitate to let us know.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply