程式:
引用:// Create a XYChart object of size 700 x 450 pixels
XYChart c = new XYChart(700, 450);
// Set the plotarea at (30, 20) and of size 200 x 200 pixels
c.setPlotArea(120, 70, 520, 270);
// Add a line chart layer using the given data
c.addLineLayer(data, -1, "XXXX 走势图");
// Display 1 out of 3 labels on the x-axis.
c.xAxis().setLabelStep(1);
c.setBackground(0xFFFF80, 0x0, 1);
c.setPlotArea(120, 70, 520, 270, 0xFFFFFF, -1, -1, 0xC0C0C0, -1);
c.addLegend(400, 35, false, "simsun.ttc", 10).setBackground(0xFFFF80);
其中 【simsun.ttc】 是此程式中使用的中文字型名称。
问题原因:
Linux 下无 【simsun.ttc】 此字型档。
问题解决:
从 Windows 系统将 【simsun.ttc】 此档案复制到专案的JavaSource 下,重新打包,重新发布,重新启动 Server。
或
从 Windows 系统将 【simsun.ttc】 此档案复制到专案的【专案目录】/WEB-INF/classes 下,重新启动 Server。

