Recent

Author Topic: TAchart - sort by Y  (Read 2357 times)

Dibo

  • Hero Member
  • *****
  • Posts: 1055
TAchart - sort by Y
« on: April 17, 2013, 11:00:33 am »
Hi,

I want create pareto chart using bar series. As source I have TListChartSource. It has Sort method but it sorting by X axis, I want by Y.
Now I see UserDefinedChartSource, so I probably can strore data in own TList and sort it by my self.

Regards

wp

  • Hero Member
  • *****
  • Posts: 12682
Re: TAchart - sort by Y
« Reply #1 on: April 17, 2013, 12:58:11 pm »
Exactly, that's the way to go. In most of my chart projects, the data are stored externally, in an array, or in a list, and a UserDefinedChartSource is used to interface to the series. I tried to demonstrate this strategy in the tutorial http://wiki.lazarus.freepascal.org/TAChart_Tutorial:_Userdefined_ChartSource - the tutoral is without sorting, though.

 

TinyPortal © 2005-2018