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

Message ListMessage List     Post MessagePost Message

  Is it possible to have a legend entry that use diffrent font style than the default style of the legend box
Posted by Ying on Oct-20-2015 08:19
Hi, Peter

for a specific series of my line graph, i want it to show the legend with different font style than my legend box font setting. for example I have 4 series, the first series I want the legend for that series with underline font style,  but the rest of the legend just using my default legend box setting.

Thanks
Ying

  Re: Is it possible to have a legend entry that use diffrent font style than the default style of the legend box
Posted by Peter Kwan on Oct-21-2015 00:29
Hi Ying,

There are several methods. The easiest method is to simply include the style in the data set
name using CDML. For example, in C#, it is like:

layer.addDataSet(myData, myColor, "<*font,underline=1*>My Legend Text<*/font*>");

By default, the text shown in the legend box is the data set name, and the data set name
is "<*font,underline=1*>My Legend Text<*/font*>". So what is shown will be "My Legend
Text" in underline style.

For more information on CDML, see:

http://www.advsofteng.com/doc/cdnet.htm#cdml.htm

Note that this method modifies the data set name. If the data set name is also used in
other places, it may affect them as well.

Regards
Peter Kwan

  Re: Is it possible to have a legend entry that use diffrent font style than the default style of the legend box
Posted by Ying on Oct-21-2015 01:11
Thanks, Peter