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 1131 - ChartPen.Width not being cached properly
Summary: ChartPen.Width not being cached properly
Status: RESOLVED FIXED
Alias: None
Product: .NET TeeChart
Classification: Unclassified
Component: Canvas (show other bugs)
Version: TeeChart.NET 2014 4.1.2014.12154
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-11 04:46 EST by narcís calvet
Modified: 2015-02-11 06:26 EST (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description narcís calvet 2015-02-11 04:46:52 EST
Code below doesn't change LinePen.Width on the chart with Utils.UseCaches = true, which is the default option. Looks like ChartPen.Width is not being cached correctly.

    public Form1()
    {
      InitializeComponent();
      InitializeChart();
    }

    private Steema.TeeChart.Styles.Line line1;

    private void InitializeChart()
    {
      //Steema.TeeChart.Utils.UseCaches = false;

      tChart1.Dock = DockStyle.Fill;
      tChart1.Aspect.View3D = false;

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

      tChart1.Resize += tChart1_Resize;
    }

    void tChart1_Resize(object sender, EventArgs e)
    {
      int w = tChart1.Width;
      int h = tChart1.Height;

      if ((w > 500) && (h > 400))
      {
        line1.LinePen.Width = 5;
      }
      else
      {
        line1.LinePen.Width = 2;
      }
    }