Chinese and Japanese languages are not correct in JfreeChat?

A free public discussion forum for the JFreeChart class library.

Chinese and Japanese languages are not correct in JfreeChat?

Postby jackraj » Sat Jul 06, 2013 11:00 am

Hi All,

I am using Ubuntu 11.04. In my web application jfreechart is correct for german,French,Portuguese...But for the chinese and japanese language the text values looks like square box. I can't able to get the solution for this problem. Please solve this problem

Thanks.
jackraj
 
Posts: 4
Joined: Sat Jul 06, 2013 10:51 am

Re: Chinese and Japanese languages are not correct in JfreeC

Postby david.gilbert » Mon Jul 08, 2013 6:29 am

You need to make sure the font you specify for the text in the chart actually has glyphs defined for the full set of Unicode characters.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Ask your company to buy the JFreeChart Developer Guide
:idea: Check out other products sold by my company Object Refinery Limited
david.gilbert
JFreeChart Project Leader
 
Posts: 11282
Joined: Fri Mar 14, 2003 10:29 am

Re: Chinese and Japanese languages are not correct in JfreeC

Postby jackraj » Mon Jul 15, 2013 6:56 am

Hi David,

Thanks for your support. I am using the font "Lucida Grande". I am setting the font like this.
ResourceBundle bundle =ResourceBundle.getBundle("hello", Locale.);

JFreeChart jfree = ChartFactory.createStackedBarChart(bundle.getString("title"), bundle.getString("customer"), bundle.getString("services"), defaultcategorydataset, PlotOrientation.VERTICAL, false, true, false);
CategoryPlot categoryplot = (CategoryPlot)jfreechart.getPlot();
StackedBarRenderer barrend = (StackedBarRenderer)categoryplot.getRenderer();
barrend.setDrawBarOutline(false);
barrend.setBaseItemLabelsVisible(true);
barrend.setBaseItemLabelFont(new Font("Lucida Grande",Font.PLAIN,12));

Thanks,
Jack.
jackraj
 
Posts: 4
Joined: Sat Jul 06, 2013 10:51 am

Re: Chinese and Japanese languages are not correct in JfreeC

Postby jackraj » Mon Jul 15, 2013 6:57 am

Hi David,

Thanks for your support. I am using the font "Lucida Grande". I am setting the font like this.
ResourceBundle bundle =ResourceBundle.getBundle("hello", Locale.);

JFreeChart jfree = ChartFactory.createStackedBarChart(bundle.getString("title"), bundle.getString("customer"), bundle.getString("services"), defaultcategorydataset, PlotOrientation.VERTICAL, false, true, false);
CategoryPlot categoryplot = (CategoryPlot)jfreechart.getPlot();
StackedBarRenderer barrend = (StackedBarRenderer)categoryplot.getRenderer();
barrend.setDrawBarOutline(false);
barrend.setBaseItemLabelsVisible(true);
barrend.setBaseItemLabelFont(new Font("Lucida Grande",Font.PLAIN,12));

Thanks,
Jack.
jackraj
 
Posts: 4
Joined: Sat Jul 06, 2013 10:51 am

Re: Chinese and Japanese languages are not correct in JfreeC

Postby jackraj » Tue Jul 16, 2013 7:14 am

Hi David,

Please assist me.

Thanks,
Jack.
jackraj
 
Posts: 4
Joined: Sat Jul 06, 2013 10:51 am


Return to JFreeChart - General

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 4 guests