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

Message ListMessage List     Post MessagePost Message

  Special color names in CDML
Posted by Naveen on Nov-19-2016 04:32
Hi Peter,

Is it possible to use the specialized color names (DataColor, TextColor) from CDML? Something like:

axis.addLabel(firstTick, '<*color=Transparent*>'+firstLabel+'<*color=TextColor*>'+firstLabel)

This doesn't seem to be working though.

Thanks,
Naveen

  Re: Special color names in CDML
Posted by Peter Kwan on Nov-19-2016 17:01
Hi Naveen,

Yes, you can use specialized colors in CDML.

All ChartDirector colors are integers. DataColor, TextColor, Transparent, etc., are also integers. (They are predefined integer constants.)

CDML expects the integer colors to be expressed in hexadecimal. So you just need to express the integers in hexadecimal.

For example, in Python:

'<*color=' + hex(Transparent) + '*>' + firstLabel+'<*color=' + hex(TextColor) + '*>' +  firstLabel

Hope this can help.

Regards
Peter Kwan