Recent

Author Topic: Problem with PieChart  (Read 7018 times)

bigeno

  • Sr. Member
  • ****
  • Posts: 266
Re: Problem with PieChart
« Reply #15 on: March 23, 2019, 08:40:42 pm »
Nice, now I can clean up my code and use OnDrawPie. :) working...

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: Problem with PieChart
« Reply #16 on: March 24, 2019, 12:22:49 am »
I changed my mind and renamed the new event to OnCustomDrawPie, sorry. I want all custom-draw events having a drawer as parameter to be named alike. I also added an event OnCustomDrawBar to TBarSeries, and deprecated the old OnBeforeDrawBar (which required a canvas as parameter). TAChart is not very consistent in using a drawer or a canvas as parameters in custom-draw events - by and by I want to remove the events having a canvas.

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: Problem with PieChart
« Reply #17 on: March 24, 2019, 12:26:20 am »
Nice, now I can clean up my code and use OnDrawPie. :) working...
Very nice pie charts! If you could post the event handlers used for such charts I would add it to one of the TAChart demos (I don't have much experience with BGRABitmap).

bigeno

  • Sr. Member
  • ****
  • Posts: 266
Re: Problem with PieChart
« Reply #18 on: March 24, 2019, 11:31:31 am »
Can you also add OnCustomDrawPie for ADrawer.RadialPie ? need spTop data also when FInnerRadiusPercent = 0. (line 653).

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: Problem with PieChart
« Reply #19 on: March 24, 2019, 11:40:29 am »
Sorry, I thought I had done that... Try the new revision.

bigeno

  • Sr. Member
  • ****
  • Posts: 266
Re: Problem with PieChart
« Reply #20 on: March 24, 2019, 08:47:28 pm »
Attached modified your radial demo.
Thats simple demo without range checking on APoints etc.
For now its gradient based on Prev and Next angle for every slice, first color for gradient get from series, second always white. Added required package BGRABitmapPack.
Oh, Radius property of TCustomPieSeries need to be public. Please check the code.

JD

  • Hero Member
  • *****
  • Posts: 1848
Re: Problem with PieChart
« Reply #21 on: March 30, 2019, 08:47:13 am »
Hi there wp,

Wonderful work, as usual. Thanks a lot. Will this trunk version work with Lazarus 2.0 release version?

Cheers,

JD
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: Problem with PieChart
« Reply #22 on: March 30, 2019, 12:01:45 pm »
No, not suitable for v2.0-fixes due to lots of new features.

 

TinyPortal © 2005-2018