Hi ethen_jean,
First, make sure the Chinese character are entered correctly into Java. For example, if
the Chinese character is entered as string literal in the JSP source code, please make
sure it is using an encoding that your JSP system using. You may refer to the
pageEncoding attribute below:
http://docs.oracle.com/cd/B14099_19/web.1012/b14014/jspnls.html)
To verify, you may include the characters and its unicode as understood by Java in the
chart title. For example:
String myDataSetName = ".....";
//The character code of the first character
int charCode = (int)(myDataSetName.charAt(0));
//Note: The MingLiu is just an example font. Please use a Chinese font that
//exists in your system.
c.addTitle("" + charCode + " " + myDataSetName, "MingLiu");
Please verify if the data set name is displayed correctly in the chart title. If not, please
check if the unicode is correct. If the unicode is not correct, it is likely your Chinese
character is not entered correctly into Java.
If the text is correct on the chart, but incorrect in the browser, I assume the incorrect
text is a tooltip drawn by the browser, not something on the chart drawn by
ChartDirector. This is usually because you are using a content encoding that does not
support Chinese. Please change the content encoding to an encoding that supports
Chinese, such as UTF-8. You may refer to "contentType" in the link above.
Regards
Peter Kwan |