本文整理汇总了Java中com.xeiam.xchart.StyleManager.LegendPosition类的典型用法代码示例。如果您正苦于以下问题:Java LegendPosition类的具体用法?Java LegendPosition怎么用?Java LegendPosition使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LegendPosition类属于com.xeiam.xchart.StyleManager包,在下文中一共展示了LegendPosition类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: makeBarChart
import com.xeiam.xchart.StyleManager.LegendPosition; //导入依赖的package包/类
/**
* Creates a frequency bar diagram based on the frequency map.
*
* @param freqMap
* frequency map
* @param seriesName
* name of the series
* @return chart
*/
private static Chart makeBarChart(final Map<String, Integer> freqMap,
final String seriesName) {
final int frameWidth = 800;
final int frameHeight = 600;
// Convert input data for processing
ArrayList<String> labels = new ArrayList<String>(freqMap.keySet());
ArrayList<Integer> frequency = new ArrayList<Integer>(freqMap.values());
// Create Chart
Chart chart = new ChartBuilder().chartType(ChartType.Bar)
.width(frameWidth).height(frameHeight).title("Score Histogram")
.xAxisTitle(seriesName).yAxisTitle("Frequency").build();
chart.addSeries(seriesName, new ArrayList<String>(labels),
new ArrayList<Integer>(frequency));
// Customize Chart
chart.getStyleManager().setLegendPosition(LegendPosition.InsideNW);
return chart;
}
开发者ID:adamIqbal,项目名称:Health,代码行数:31,代码来源:FreqBar.java
示例2: createChart
import com.xeiam.xchart.StyleManager.LegendPosition; //导入依赖的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
示例3: createChart
import com.xeiam.xchart.StyleManager.LegendPosition; //导入依赖的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
示例4: createChart
import com.xeiam.xchart.StyleManager.LegendPosition; //导入依赖的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
示例5: createComponent
import com.xeiam.xchart.StyleManager.LegendPosition; //导入依赖的package包/类
public static JComponent createComponent() {
JComponent container = new JPanel();
container.setLayout(new BoxLayout(container, BoxLayout.LINE_AXIS));
Chart chart1 = createChart("Voltage", 550, 450, LegendPosition.InsideNE, true);
Chart chart2 = createChart("Error Covariance", 450, 450, LegendPosition.InsideNE, false);
constantVoltageTest(chart1, chart2);
container.add(new XChartPanel(chart1));
container.add(new XChartPanel(chart2));
container.setBorder(BorderFactory.createLineBorder(Color.black, 1));
return container;
}
开发者ID:SpoonLabs,项目名称:astor,代码行数:16,代码来源:ConstantVoltageExample.java
示例6: createComponent
import com.xeiam.xchart.StyleManager.LegendPosition; //导入依赖的package包/类
public static JComponent createComponent() {
JComponent container = new JPanel();
container.setLayout(new BoxLayout(container, BoxLayout.PAGE_AXIS));
Chart chart = createChart("Cannonball", LegendPosition.InsideNE);
cannonballTest(chart);
container.add(new XChartPanel(chart));
container.setBorder(BorderFactory.createLineBorder(Color.black, 1));
return container;
}
开发者ID:Quanticol,项目名称:CARMA,代码行数:12,代码来源:CannonballExample.java
示例7: startChart
import com.xeiam.xchart.StyleManager.LegendPosition; //导入依赖的package包/类
public void startChart(String title, String xLabel, String yLabel) {
chart = new ChartBuilder().width(IMAGE_WIDTH).height(IMAGE_HEIGHT).title(title).xAxisTitle(xLabel)
.yAxisTitle(yLabel).build();
chart.getStyleManager().setLegendPosition(LegendPosition.InsideSE);
}
开发者ID:sopeco,项目名称:DynamicSpotter,代码行数:6,代码来源:XChartBuilder.java
示例8: startChartWithoutLegend
import com.xeiam.xchart.StyleManager.LegendPosition; //导入依赖的package包/类
public void startChartWithoutLegend(String title, String xLabel, String yLabel) {
chart = new ChartBuilder().width(IMAGE_WIDTH).height(IMAGE_HEIGHT).title(title).xAxisTitle(xLabel)
.yAxisTitle(yLabel).build();
chart.getStyleManager().setLegendPosition(LegendPosition.InsideSE);
chart.getStyleManager().setLegendVisible(false);
}
开发者ID:sopeco,项目名称:DynamicSpotter,代码行数:7,代码来源:XChartBuilder.java
注:本文中的com.xeiam.xchart.StyleManager.LegendPosition类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论