Recent

Author Topic: TChart - To update or not to update  (Read 244 times)

Nicole

  • Hero Member
  • *****
  • Posts: 1095
TChart - To update or not to update
« on: April 26, 2025, 09:06:55 am »
I have these versions:
Code: Text  [Select][+][-]
  1. Lazarus 3.0 (rev lazarus_3_0)
  2. FPC 3.2.2
  3. x86_64-win64-win32/win64

Now ChatGPT (who talks a lot when the day is long) claims there is a newer version of TChart integrated into a newer version of Lazarus.
Was that 3.04?
This version would have e.g. logarithmic scaling directly in the object inspector without transformation.

Now, on the one hand, I don't know whether this is even true.
On the other hand, I wouldn't update to another version "just for that".
Every update takes a lot of time and then something no longer works.

Can you please comment on this? Thx.




wp

  • Hero Member
  • *****
  • Posts: 12784
Re: TChart - To update or not to update
« Reply #1 on: April 26, 2025, 10:36:35 am »
Since TAChart is bundled with Lazarus every new version of Lazarus usually comes with a new version of TAChart, both bugfixes and new features.

New features in the upcoming Laz v4.0:
  • TBubbleSeries: New BubbleSizeUnits options bruPercentageRadius and bruPercentageArea - the bubble size values are interpreted as bubble radius or bubble area. The bubble radius then is drawn as a percentage of the plot area size where the largest bubble corresponds to BubbleRadiusPercentage.
  • TChartSeries: New event OnGetMarkText, similar to OnGetMark, but with additional parameters (series, y index and x index of the data point) for specifying individual data point labels in multi-values series. OnGetMark has been deprecated and will be removed when v5.0 is released
  • TLineSeries: New LineTypes ltStepCenterXY and ltStepCenterYX, available in LibreOffice Calc.
  • TPieSeries, TBubbleSeries, TBarSeries allow controlling all brush and pen parameters of individual data points by means of the Styles property.
  • Chart sources can provide multi-level data-point labels separated by the LabelSeparator.
  • Chart.AxisPosition now can be given in axis units (cuAxis). For performing the correct axis transformation, the index of the orthogonal axis containing the Position value must be specified, OrthogonalAxisIndex.
  • Chart styles were extended to support individual series pointers per y level.
  • The Chart.Legend allows the value ColumnCount = 0 now which automatically determines orientation and fill order of the legend, depending on the Alignment property.
in v5.0 (some time in the future):
  • New series type, TStateSeries, for displaying the state of machines etc. Also usable for a simple Gantt chart.
  • Improved rendering of broken lines: new property EnhancedBrokenLines of new TEnhancedChartPen used by some TLineSeries and other line-oriented series types.
It's your decision whether these changes are enough for you to upgrade from 3.0.x, or not.

I am aware that updating poses some risk, in particular in case of a large project. I'd propose to do this step by step: Install Laz v3.8 as a secondary installation - for a secondary installation you only have to check the corresponding box in the installer. It leaves your old installation untouched so that you can use both versions independently. Then make a backup of your project for the case that the new version would introduce some incompatible changes. Load your project into the new Laz. Try to compile and run. Any errors? Try to fix them. If necessary, put the corrected and old code in to a version check ({$IF LCL_Fullversion >= 3080000} ... code for v3.8+ ... {$ELSE} ... old code ...{$IFEND}; reqires unit LCLVersion in "uses"). Then load the project into your old Lazarus version. Do the same checks. When everything works you can continue working with any of the two versions. This has the advantage that you always can go back to the old version if some severe issues might come up with the new version. Finally repeat the same with v4.0 when it is released (or even with the current RC, but the release will happen pretty soon).

As usual, ChatCPT is talking nonsense when stating that Logarithmic can be handled without transformations - this is in Delphi's TeeChart, IIRC, but the builders of Lazarus' TAChart decided to modularize this.



Nicole

  • Hero Member
  • *****
  • Posts: 1095
Re: TChart - To update or not to update
« Reply #2 on: April 26, 2025, 03:48:03 pm »
Thank you so much.

about ChatGPT: I am not sure, if it helps me or wastes my time. The tricks seems to be to keep conversations short. It is very human, it never says, "I have no idea", but talks on and on, pretending to know something. It writes code with properties just grabbed out from the air. Looking nicely, but never ever had existed.

On the other hand it saved me a lot of time with SQL-queries, complex joins. I even keyed in a method with a query and asked, "why doesn't it work?" and it answered: typo of field's name in line 14. This was true. I key in whole types and ask it to write code for it and it does. I name the class for the job and copy the snipes directly into the IDE. The idea, that all this code will go to the cloud under the line is strange at the same time.

I think, I will wait for Lazarus 4. A lot of work is in front of me. There is a software I need essentially. Not available for Linux. And I bet, it won't work with Wine. This software-functionality I have to replace. Then I am ready to leave the Microsoft-world. Cross fingers, I will not take Lazarus 5 in the meanwhile.

« Last Edit: April 26, 2025, 04:22:16 pm by Nicole »

 

TinyPortal © 2005-2018