ChartDirector 6.2 (.NET Edition)
Internally, ChartDirector uses Unicode to handle text. It fully supports international characters (that is, non-English and non-ASCII characters).
For ChartDirector to draw an international character in an image, it must use the proper fonts. By default, ChartDirector uses the Arial
font. If the Arial
font does not contain characters you want to display, you may need to specify an alternative font that contains the characters you need.
For example, if you want to display traditional Chinese characters, which are not supported in the Arial font, you will need to specify an alternative font, such as "mingliu.ttc".
You may change the default font by using BaseChart.setDefaultFonts
. ChartDirector API also allows changing the fonts in some particular text labels in the chart. For example, you may use the BaseChart.addTitle
to specify the font for the chart title. Finally, you may use the ChartDirector Mark Up Language
to specify the font used for any text.
If you are using international characters as string literals in your source code, please make sure your programming language interpreter or compiler can understand the encoding of the international characters.
Many Microsoft programming languages (e.g. VBScript) interpret source codes using the operating system's default code page. If your source code is written using a different code page from your operating system's default (e.g. source code in UTF8 or Big5 but your operating system's code page is ANSI 1252), the programming language interpreter may be unable to understand your source code correctly.
Some Microsoft programming system allows you to configure the code page for the source code. For example, in ASP or ASPX pages, you may use the @CODEPAGE directive to inform the programming language interpret to use an alternative code page. You would still need to ensure your operating system has installed the alternative code page. On Windows 2000, code pages are configured using Control Panel / Regional Settings.
On a web environment, note that even if a web server can serve international web pages correctly, it does not mean that the the web server understands international characters. It may simply pass the characters transparently to the browser. For plain HTML web pages, only the browser needs to understand international characters and have the correct international fonts, not the server.
On the other hand, for ChartDirector applications, charts are rendered on the server side. Therefore, the server needs to understand the international characters and have the proper fonts installed, while there is no particular requirement for the browser. You may need to ensure the source code is written using your operating system's default code page, or use the @CODEPAGE directive to inform the language interpreter to use an alternative code page.
Number and Date/Time Formats
In ChartDirector, the decimal point, thousand separator and the names used for months, weekdays, etc., are all configurable.
For example, instead of using "." as the decimal point, you may configure ChartDirector to use "," as the decimal point using BaseChart.setNumberFormat
, or by using Parameter Substitution and Formatting
Similarly, instead of using "Sun", "Mon", "Tue", ... etc, for the weekday names in date formatting, you may use BaseChart.setWeekDayNames
to supply another set of names. The same applies to month names using BaseChart.setMonthNames
, and to AM/PM representation using BaseChart.setAMPM
© 2017 Advanced Software Engineering Limited. All rights reserved.