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

Message ListMessage List     Post MessagePost Message

  Add percentage value
Posted by Ray Helinski on Jan-18-2012 05:41
Attachments:
See attached efficiency charts. I've been asked to add a percentage value to the "Actual Hours" bar. The percentage would be calculated as (1 - [("Est Hours" - "Actual Hours") / "Est Hours"]) * 100 and this value should appear near the "Actual Hours" bar. Is this possible? If so, please advise as to how.
Efficiency_Charts.jpg

  Re: Add percentage value
Posted by Peter Kwan on Jan-19-2012 01:36
Hi Ray,

There are several methods. For your case, I think the simplest method is to use the Layer.addCustomGroupLabel (for labels outside the bar) or Layer.addCustomDataLabel (for labels inside the bar). For example, in VB/VBScript, it is like:

For i = 0 To UBound(labels)
     myLabel = .... compute the text label ....
     Call layer.addCustomGroupLabel(2, i, myLabel, "arial.ttf", 8, &H000000)
Next

Hope this can help.

Regards
Peter Kwan