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 1792

Summary: LegendScrollBar rounding problem
Product: .NET TeeChart Reporter: christopher ireland <chris>
Component: ToolsAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
URL: http://www.teechart.net/support/viewtopic.php?f=4&t=16436
Chart Series: --- Delphi / C++ Builder RAD IDE Version:
Attachments: before fix
after fix

Description christopher ireland 2017-02-20 06:00:27 EST
Created attachment 716 [details]
before fix

As reported in the URL.

The issue here is that the rounding problem (from double -> int for GDI+ pixels) will depend on the number of elements in the LegendScrollBar, meaning that the 'fix' of a pixel (an int of value '1') will not necessarily render correctly in all cases. 

For this code:
    private void InitializeChart()
    {
      Line series = new Line(tChart1.Chart);
      series.FillSampleValues(100);

      LegendScrollBar tool = new LegendScrollBar(tChart1.Chart);
      tool.ThumbBrush.Color = Color.Red;
      tool.Bevel.Inner = BevelStyles.None;
      tool.Bevel.Outer = BevelStyles.None;

      tChart1.CurrentTheme = ThemeType.Opera;

    }

the fix can be seen to affect rendering in the two attached images (at 3x magnification).
Comment 1 christopher ireland 2017-02-20 06:01:08 EST
Created attachment 717 [details]
after fix