-
FEATURED COMPONENTS
First time here? Check out the FAQ!
请问char中的title为中文的时候显示乱码,怎么解决
public class MyChart extends Chart {
/**
*
*/
public MyChart() {
super();
Font f = new Font("宋体", Font.PLAIN, 10);
if (getTitle()!=null){
setTitleFont(f);
}
setXAxisFont(f);
setYAxisFont(f);
setXAxisTickFont(f);
setYAxisTickFont(f);
setEngine(new MyChartEngine());
}
}
class MyChartEngine extends JFreeChartEngine {
public boolean prepareJFreeChart(org.jfree.chart.JFreeChart jfchart,Chart chart) {
jfchart.getPlot().setOutlineVisible(false);
return false;
}
}
<chart id="fund_chart" width="260" height="150" type="pie" showLegend="false" bgAlpha="0" paneAlpha="0" fgAlpha="128" threeD="true" model="@{over_view_win.model}" showTooltiptext="true" use="MyChart"/>
Asked: 2010-09-28 21:45:42 +0800
Seen: 730 times
Last updated: Sep 29 '10