Example usage for org.jfree.chart ChartPanel setAlignmentX

List of usage examples for org.jfree.chart ChartPanel setAlignmentX

Introduction

In this page you can find the example usage for org.jfree.chart ChartPanel setAlignmentX.

Prototype

@BeanProperty(description = "The preferred horizontal alignment of the component.")
public void setAlignmentX(float alignmentX) 

Source Link

Document

Sets the horizontal alignment.

Usage

From source file:com.devoteam.srit.xmlloader.core.report.derived.DerivedCounter.java

public ChartPanel getChartPanel() {
    ChartPanel chartPanel = new ChartPanel(null);
    chartPanel.setLayout(new javax.swing.BoxLayout(chartPanel, javax.swing.BoxLayout.Y_AXIS));
    chartPanel.setAlignmentX(java.awt.Component.LEFT_ALIGNMENT);
    chartPanel.setAlignmentY(java.awt.Component.TOP_ALIGNMENT);

    if (timeChart == null) {
        timeChart = getTimeChart();/*from  w  w  w  . ja  va 2 s  .c o m*/
    }
    chartPanel.add(new ChartPanel(timeChart));

    if (this instanceof StatValue) {
        if (histogramChart == null) {
            histogramChart = getHistogramChart();
        }
        chartPanel.add(new ChartPanel(histogramChart));
    }

    return chartPanel;
}