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

Message ListMessage List     Post MessagePost Message

  Display of currency symbols ...
Posted by cdtyyz on May-04-2013 23:22
Is there a preferred way to handle all display of all the currency symbols in the localized formats using setAggregateLabelFormat? I am thinking something along the lines of ...

switch ($local) {
case ("Euro"):
  $layer->setAggregateLabelFormat("{value| ,} ".$CURR_SYMBOL);
  $c->yAxis->setLabelFormat("{value|2 ,} ".$CURR_SYMBOL);
  break;
... etc. ...
default:
  layer->setAggregateLabelFormat($CURR_SYMBOL." {value|2,.}");
  $c->yAxis->setLabelFormat($CURR_SYMBOL." {value|2,.}");
  break;
}

... but am unsure of where to start in terms of understanding the glyphs that are supported in the default ChartDirector font(s) and the codes to use to display various currencies and how best to handle localized display of currency values.  Anyone who has solved this before and/or can provide direction is most appreciated.

  Re: Display of currency symbols ...
Posted by Peter Kwan on May-06-2013 23:55
Hi cdtyyz,

For aggregate labels and axis labels, the default font in ChartDirector is "Arial".

If your operating system comes standard with fonts (eg. Windows, Mac OS X), ChartDirector will use the fonts in your operating system. If your operating system does not have a standard location for fonts (eg. Linux, FreeBSD, Solaris), ChartDirector will load the fonts from the "fonts" subdirectory under the directory that contains "libchartdir.so".

Note that ChartDirector does not come with the Arial font (which is copyrighted and cannot be redistributed). If the Arial font does not exist, ChartDirector will substitute it with a font that come with ChartDirector. That substitute font is shipped for the purpose of demonstrating the sample charts. It contains only ASCII characters a few other characters. It does not cntain the Euro symbol.

If you would like to display all currency symbols on Linux, FreeBSD or Solaris, you would need to have a font that contains all those characters. You may download the Arial font if you like. See:

http://www.advsofteng.com/doc/cdphp.htm#fontspec.htm

http://sourceforge.net/project/showfiles.php?group_id=34153&release_id=105355

http://www.microsoft.com/typography/faq/faq8.htm

You may also use other font that does have all these characters, and configure the labels to use that font.

Hope this can help.

Regards
Peter Kwan