Forum > TAChart

[resolved] Polishing TAChart for Laz 2.2.0

<< < (2/2)

wp:
I still wonder why I do not see the "Case statement does not handle all possible cases" warnings in my normal development setup. Had to switch to FPC-trunk to see them, and now I also see that the "Unused" instructions seem to have no effect any more  (but I'll address this, when a new FPC release is announced because many things may change until then).

The warnings should be gone now except for those which I explained in the other post.

I added a new liveview demo, folder "components/tachart/demo/liveview_paned", with three y axes.

Muso:

--- Quote from: wp on August 09, 2021, 05:48:02 pm ---I still wonder why I do not see the "Case statement does not handle all possible cases" warnings in my normal development setup. Had to switch to FPC-trunk to see them

--- End quote ---

Yes, this is a new feature in FPC. I accidentally ended with PFC trunk because FPCupdeluxe always installed this, no matter what branch I selected. I use now plain Git to get FPC and Lazarus and now I am again at FPC stable.
So in principle sorry for the noise, however the missing cases is a useful feature I like.  :)


--- Quote ---I added a new liveview demo, folder "components/tachart/demo/liveview_paned", with three y axes.

--- End quote ---

Many thanks!

Muso:
I compiled the 2.2 fixes branch as of today and there are some unused classes and variables that could maybe be removed:
(I remember you did not want to touch GraphMath, but maybe the parameters can go.)


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---tageometry.pas(118,3) Hint: Unit "GraphMath" not used in TAGeometrytatextelements.pas(22,3) Hint: Unit "GraphMath" not used in TATextElementstagraph.pas(527,21) Hint: Unit "GraphMath" not used in TAGraphtaseries.pas(355,28) Hint: Parameter "AAxis" not usedtaseries.pas(355,51) Hint: Parameter "AMin" not usedtaseries.pas(355,57) Hint: Parameter "AMax" not usedtaseries.pas(410,3) Hint: Unit "GraphMath" not used in TASeriestatools.pas(22,26) Hint: Unit "GraphMath" not used in TAToolstadatatools.pas(127,3) Hint: Unit "GraphMath" not used in TADataTools

wp:

--- Quote from: Muso on October 27, 2021, 03:05:47 am ---I compiled the 2.2 fixes branch as of today and there are some unused classes and variables that could maybe be removed:
[ ... ] maybe the parameters can go.

--- End quote ---
This is the related code:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---function TConstantLine.GetAxisBounds(AAxis: TChartAxis; out AMin, AMax: Double): Boolean;begin  Result := false;end;Basically, the warning about unused parameters could be removed because the boolean return value indicates that AMin and AMax are not valid here. But I am not sure whether the return value false is correct at all; my inituitive feeling would be:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---  if AAxis = ParentChart.AxisList[AxisIndex] then begin     Result := true;     AMin := Position;     AMax := AMin;   end else    Result := false;On the other hand, I do not see any problem with TConstantSeries ATM. - I will definitely not change this shortly before the 2.2 release.

Muso:

--- Quote from: wp on October 27, 2021, 10:47:13 am ---I will definitely not change this shortly before the 2.2 release.

--- End quote ---

OK. I understand this and compared to the other components TAChart's warnings are minor.

Navigation

[0] Message Index

[*] Previous page

Go to full version