Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 635 - Fastline DrawAllPointsSyle.MinMax did not work
Summary: Fastline DrawAllPointsSyle.MinMax did not work
Status: RESOLVED NOTABUG
Alias: None
Product: .NET TeeChart
Classification: Unclassified
Component: Chart (show other bugs)
Version: TeeChart.NET 2014 4.1.2014.02060
Hardware: PC Windows
: --- blocker
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-14 07:06 EDT by loeffler
Modified: 2014-03-19 08:58 EDT (History)
2 users (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments
Picure showing FastLine MinMax bug. (20.00 KB, image/png)
2014-03-14 07:06 EDT, loeffler
Details
FastLineMinMax 2012/2013 (262.88 KB, application/x-zip-compressed)
2014-03-14 12:27 EDT, sandra pazos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description loeffler 2014-03-14 07:06:58 EDT
Created attachment 114 [details]
Picure showing FastLine MinMax bug.

Hello Support
We currently switched from TeeChart 2012 to 2014. In this process we found a bug in the FastLine component, which was not present in the 2012 version.

Our code to initialize the FastLine is as following:

Steema.TeeChart.Styles.FastLine trace = new Steema.TeeChart.Styles.FastLine();
trace.Title = traceID.ToString();
trace.Color = Settings.Colors[traceID];
trace.AutoRepaint = false;
trace.LinePen.UseStyling = false;
trace.XValues.Order = ValueListOrder.None;
trace.DrawAllPoints = false;
trace.DrawAllPointsStyle = DrawAllPointsStyle.MinMax;
trace.VertAxis = VerticalAxis.Left;
trace.HorizAxis = HorizontalAxis.Bottom;

The result is shown in the attached picture. The input is a symmetric sinus. It seems that the MinMax extraction is not working for the minimum value.
Please help.

Thank you very much.
Hans Löffler
Comment 1 sandra pazos 2014-03-14 12:27:16 EDT
Created attachment 118 [details]
FastLineMinMax 2012/2013

The code below reproduces the problem: 
        Steema.TeeChart.TChart tChart1; 
        public Form1()
        {
            InitializeComponent();
           tChart1 = new Steema.TeeChart.TChart();
            this.Controls.Add(tChart1);
            InitializeChart();
        }

        private void InitializeChart()
        {
            Steema.TeeChart.Styles.FastLine trace = new Steema.TeeChart.Styles.FastLine(tChart1.Chart);
            tChart1.Aspect.View3D = false;
            tChart1.Dock = DockStyle.Fill; 
            trace.AutoRepaint = false;
            trace.LinePen.UseStyling = false;
            trace.XValues.Order = ValueListOrder.None;
            trace.DrawAllPoints = false;
            for (int i = 0; i < 100; i++)
            {
                trace.Add(i, Math.Sin(i*10)); 
            }
            trace.DrawAllPointsStyle = DrawAllPointsStyle.MinMax;
            trace.VertAxis = VerticalAxis.Left;
            trace.HorizAxis = HorizontalAxis.Bottom;
        }

Also, I have added two images to see the difference between TeeChart.Net 2012 and TeeChart.Net 2014
Comment 2 christopher ireland 2014-03-19 08:14:07 EDT
This issue occurs thanks to the fix to ticket:
http://bugs.teechart.net/show_bug.cgi?id=650
Comment 3 christopher ireland 2014-03-19 08:58:10 EDT
"The result is shown in the attached picture. The input is a symmetric sinus. It seems that the MinMax extraction is not working for the minimum value.
Please help."

It is true to say that the extraction for the minimum value was changed for the fix to http://bugs.teechart.net/show_bug.cgi?id=650 , however, I don't see that this means that the MinMax extraction is no longer working or is erroneous.

My claim is that the min extraction of the TeeChart 2012 was wrong. I base this claim on the following code:

    private Steema.TeeChart.Styles.FastLine trace;

    private void button1_Click(object sender, EventArgs e)
    {
      trace.DrawAllPoints = !trace.DrawAllPoints;
    }

    private void InitializeChart()
    {
      trace = new Steema.TeeChart.Styles.FastLine(tChart1.Chart);
      tChart1.Aspect.View3D = false;
      tChart1.Dock = DockStyle.Fill;
      trace.AutoRepaint = false;
      trace.LinePen.UseStyling = false;
      trace.XValues.Order = ValueListOrder.None;
      trace.DrawAllPoints = false;
      for (int i = 0; i < 100; i++)
      {
        trace.Add(i, Math.Sin(i * 10));
      }
      trace.DrawAllPointsStyle = DrawAllPointsStyle.MinMax;
      trace.VertAxis = VerticalAxis.Left;
      trace.HorizAxis = HorizontalAxis.Bottom;
    }

In the 2014 version the Chart is identical with DrawAllPoints true or false, whereas in the 2012 version the Chart is not identical. What is more, when resizing the form in a horizontal direction to make the Chart thinner, the FastLine series 'form' is maintained in 2014 whereas it isn't in 2012. According to the design paradigm of DrawAllPoints, the FastLine series points are only recalculated when the pixel values of the XValues of the points are identical - this being so, the TeeChart 2012 version is wrong to modify series points when the above code is first run, as none of the pixel values of the XValues of the points are identical.