当前位置: 首页>>代码示例>>Java>>正文


Java Chart.setChartTitle方法代码示例

本文整理汇总了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;
}
 
开发者ID:Quanticol,项目名称:CARMA,代码行数:23,代码来源:RealDistributionComparison.java

示例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;
}
 
开发者ID:Quanticol,项目名称:CARMA,代码行数:22,代码来源:ConstantVoltageExample.java

示例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;
}
 
开发者ID:Quanticol,项目名称:CARMA,代码行数:21,代码来源:CannonballExample.java


注:本文中的com.xeiam.xchart.Chart.setChartTitle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。