ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Any way of having a lable show a time span in hh:nn format?
Posted by palloquin on Apr-16-2014 23:52
Hi,

I have a pie chart that shows the total number of minutes for different tasks.

Now, pie is devided the way it should be, but I would like the labels to read friendlier;
Instead of saying '1241 minutes' it would be nice to see: 'time spend: 20:41'...

Any way of doing this? I could feed the chart with values this way, but I doubt it will understand values formated like this...

  Re: Any way of having a lable show a time span in hh:nn format?
Posted by Peter Kwan on Apr-17-2014 02:01
Hi Palloquin,

If the hour values are less than 60, you can use "{value|nn:ss}". For example:

c.setLabelFormat("{label} {value|nn:ss}");

If the hour values can be greater (say hundreds of hours), you would need to use:

c.setLabelFormat("{label} {=({value}-{value}%60)/60}:{value|ss}");

Hope this can help.

Regards
Peter Kwan