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

Message ListMessage List     Post MessagePost Message

  Image on top of bar
Posted by Hill on Sep-09-2009 23:41
I'm creating an XY bar chart. I would like to use different imagesw on top of the bars based on a separate array eg. If Condition_Array(0) = true then display green flag image else red flag image. Is this possible ?

Thanks for any help..

  Re: Image on top of bar
Posted by Peter Kwan on Sep-10-2009 01:37
Hi Hill,

Yes. You may use CDML to put images on top of the bars. For example, in VB/VBScript:

'The images you want to use. If you are using IIS, remember to use Server.MapPath to
'translate the URL path into file system path.
images = Array("\\path\\to\\aaa.png", "\\path\\to\\bbb.png", "\\path\\to\\aaa.png", ....)

Set layer = c.addBarLayer3(myData)

'add the image path names as an extra field of the bars
Call layer.addExtraField(images)

'put images in the aggregate label position, in which the image path name is taken from the extra field
Call layer.setAggregateLabelFormat("<*img={field0}*>")

Hope this can help.

Regards
Peter Kwan

  Re: Image on top of bar
Posted by Hill on Sep-17-2009 07:03
Thanks for your help. This works per my expectations..