本文整理汇总了Java中com.xeiam.xchart.Chart.setChartTitle方法的典型用法代码示例。如果您正苦于以下问题:Java Chart.setChartTitle方法的具体用法?Java Chart.setChartTitle怎么用?Java Chart.setChartTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.xeiam.xchart.Chart
的用法示例。
在下文中一共展示了Chart.setChartTitle方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createChart
import com.xeiam.xchart.Chart; //导入方法依赖的package包/类
public static Chart createChart(String title, int minX, int maxX, LegendPosition position) {
Chart chart = new ChartBuilder().width(235).height(200).build();
// Customize Chart
chart.setChartTitle(title);
chart.getStyleManager().setChartTitleVisible(true);
chart.getStyleManager().setChartTitleFont(new Font("Arial", Font.PLAIN, 10));
chart.getStyleManager().setLegendPosition(position);
chart.getStyleManager().setLegendVisible(true);
chart.getStyleManager().setLegendFont(new Font("Arial", Font.PLAIN, 10));
chart.getStyleManager().setLegendPadding(6);
chart.getStyleManager().setLegendSeriesLineLength(6);
chart.getStyleManager().setAxisTickLabelsFont(new Font("Arial", Font.PLAIN, 9));
chart.getStyleManager().setXAxisMin(minX);
chart.getStyleManager().setXAxisMax(maxX);
chart.getStyleManager().setChartBackgroundColor(Color.white);
chart.getStyleManager().setChartPadding(4);
chart.getStyleManager().setChartType(ChartType.Line);
return chart;
}
示例2: createChart
import com.xeiam.xchart.Chart; //导入方法依赖的package包/类
public static Chart createChart(String title, int width, int height,
LegendPosition position, boolean legendVisible) {
Chart chart = new ChartBuilder().width(width).height(height).build();
// Customize Chart
chart.setChartTitle(title);
chart.getStyleManager().setChartTitleVisible(true);
chart.getStyleManager().setChartTitleFont(new Font("Arial", Font.PLAIN, 12));
chart.getStyleManager().setLegendPosition(position);
chart.getStyleManager().setLegendVisible(legendVisible);
chart.getStyleManager().setLegendFont(new Font("Arial", Font.PLAIN, 12));
chart.getStyleManager().setLegendPadding(6);
chart.getStyleManager().setLegendSeriesLineLength(10);
chart.getStyleManager().setAxisTickLabelsFont(new Font("Arial", Font.PLAIN, 10));
chart.getStyleManager().setChartBackgroundColor(Color.white);
chart.getStyleManager().setChartPadding(4);
chart.getStyleManager().setChartType(ChartType.Line);
return chart;
}
示例3: createChart
import com.xeiam.xchart.Chart; //导入方法依赖的package包/类
public static Chart createChart(String title, LegendPosition position) {
Chart chart = new ChartBuilder().width(650).height(450).build();
// Customize Chart
chart.setChartTitle(title);
chart.getStyleManager().setChartTitleVisible(true);
chart.getStyleManager().setChartTitleFont(new Font("Arial", Font.PLAIN, 12));
chart.getStyleManager().setLegendPosition(position);
chart.getStyleManager().setLegendVisible(true);
chart.getStyleManager().setLegendFont(new Font("Arial", Font.PLAIN, 12));
chart.getStyleManager().setLegendPadding(6);
chart.getStyleManager().setLegendSeriesLineLength(10);
chart.getStyleManager().setAxisTickLabelsFont(new Font("Arial", Font.PLAIN, 10));
chart.getStyleManager().setChartBackgroundColor(Color.white);
chart.getStyleManager().setChartPadding(4);
chart.getStyleManager().setChartType(ChartType.Line);
return chart;
}