Recent

Author Topic: (Solved) LinePen Width does not work  (Read 1656 times)

arneolav

  • Full Member
  • ***
  • Posts: 145
    • ElTranslador
(Solved) LinePen Width does not work
« on: September 12, 2021, 11:08:10 am »
After install Lazarus 2.2.0RC1, LinePen Width does not work, has been ok on all prev. version.
This is a multi series chart.
Example: TLineSeries(MyChart.Series).LinePen.Width:= 2;
« Last Edit: September 16, 2021, 09:51:14 pm by arneolav »
Win XP, Win7, Win 10 win64 , Lazarus 2.0.12
Delphi/DevExpress

wp

  • Hero Member
  • *****
  • Posts: 9025
Re: LinePen Width does not work
« Reply #1 on: September 12, 2021, 11:24:48 am »
No, it does work. Look at the attached project.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

arneolav

  • Full Member
  • ***
  • Posts: 145
    • ElTranslador
Re: LinePen Width does not work
« Reply #2 on: September 12, 2021, 01:53:26 pm »
I see, thanks.
Strange, can't get it to work. Hardcoded the value, but no....
Have to investigate.
Win XP, Win7, Win 10 win64 , Lazarus 2.0.12
Delphi/DevExpress

arneolav

  • Full Member
  • ***
  • Posts: 145
    • ElTranslador
Re: LinePen Width does not work
« Reply #3 on: September 13, 2021, 07:04:23 pm »
Hi!
I have spent some hours in investigation on the LinePen.Width .
Before I start creating an example may be I can get som advices;

Have checked in  linepen_width.lpr:
 I don't have: tachartlazaruspkg, ( seems no difference );

Dropped on myForm:  TChart, TChartToolset, TChartStyles
 Defined in the Form:   LSeries: TLineSeries;

But I have to create: LSeries := TLineSeries.Create(MyChart);
and doing like this:  MyChart.AddSeries(LSeries);

Any ideas?
Win XP, Win7, Win 10 win64 , Lazarus 2.0.12
Delphi/DevExpress

wp

  • Hero Member
  • *****
  • Posts: 9025
Re: LinePen Width does not work
« Reply #4 on: September 13, 2021, 07:35:15 pm »
Attached is a runtime version of the demo program.

If this one or the demos in the TAChart demo folder ((lazarus)/components/tachart/demo) do not work either you should try to recompile the IDE: "Tools" > "Configure Build Lazarus", in the "Clean up" box check "Clean all" and "Switch after building to automatically". Then click "Build". When the IDE restarts try TAChart again.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

arneolav

  • Full Member
  • ***
  • Posts: 145
    • ElTranslador
Re: LinePen Width does not work
« Reply #5 on: September 13, 2021, 07:59:44 pm »
Sorry, no runtime in the attached version.

Tried recompile IDE, cleanup, etc, .. but no..
Win XP, Win7, Win 10 win64 , Lazarus 2.0.12
Delphi/DevExpress

arneolav

  • Full Member
  • ***
  • Posts: 145
    • ElTranslador
Re: LinePen Width does not work
« Reply #6 on: September 14, 2021, 05:14:24 pm »
It seems ColorEach is the problem:

As one want an other color on values under a split value colorEach is used:
TLineSeries(LSeries).ColorEach    := cePointAndLineAfter; 

Removed ColorEach and then PenWidth does work.
But this created another problem: Color under split value is lost.

Edit:
Did a test, put a line .ColorEach in demo Linepen_width, unit1:

// Change the LinePen.Width of the red series
procedure TForm1.SpinEdit1Change(Sender: TObject);
begin
  LineSeries_Red.ColorEach     := cePointAndLineAfter;        // <--------------
  LineSeries_Red.LinePen.Width := SpinEdit1.Value;
end; 

Then LinePenWidth does not work.
« Last Edit: September 14, 2021, 08:07:11 pm by arneolav »
Win XP, Win7, Win 10 win64 , Lazarus 2.0.12
Delphi/DevExpress

arneolav

  • Full Member
  • ***
  • Posts: 145
    • ElTranslador
Re: LinePen Width does not work
« Reply #7 on: September 16, 2021, 11:40:42 am »
As there is no response i'll repeate:

LinePen.Width does work when ColorEach is NOT set.
LinePen.Width does NOT work when ColorEach is set.

Is this a bug or anything?



 
Win XP, Win7, Win 10 win64 , Lazarus 2.0.12
Delphi/DevExpress

wp

  • Hero Member
  • *****
  • Posts: 9025
Re: LinePen Width does not work
« Reply #8 on: September 16, 2021, 11:52:14 am »
Fixed in main (trunk) and fixes_2_2.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

arneolav

  • Full Member
  • ***
  • Posts: 145
    • ElTranslador
Re: LinePen Width does not work
« Reply #9 on: September 16, 2021, 12:21:10 pm »
Thank's a lot!!!

Tested ok.
« Last Edit: September 16, 2021, 09:50:57 pm by arneolav »
Win XP, Win7, Win 10 win64 , Lazarus 2.0.12
Delphi/DevExpress

 

TinyPortal © 2005-2018