當前位置: 首頁>>代碼示例>>Java>>正文


Java CategoryPlot.setBackgroundPaint方法代碼示例

本文整理匯總了Java中org.jfree.chart.plot.CategoryPlot.setBackgroundPaint方法的典型用法代碼示例。如果您正苦於以下問題:Java CategoryPlot.setBackgroundPaint方法的具體用法?Java CategoryPlot.setBackgroundPaint怎麽用?Java CategoryPlot.setBackgroundPaint使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.jfree.chart.plot.CategoryPlot的用法示例。


在下文中一共展示了CategoryPlot.setBackgroundPaint方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createBarChart

import org.jfree.chart.plot.CategoryPlot; //導入方法依賴的package包/類
/**
 * Creates the histogram chart.
 * 
 * @return
 */
private JFreeChart createBarChart() {
	JFreeChart chart = ChartFactory.createBarChart(null, null, null, createBarDataset(), PlotOrientation.VERTICAL,
			false, false, false);
	AbstractAttributeStatisticsModel.setDefaultChartFonts(chart);
	chart.setBackgroundPaint(null);
	chart.setBackgroundImageAlpha(0.0f);

	CategoryPlot plot = (CategoryPlot) chart.getPlot();
	plot.setRangeGridlinesVisible(false);
	plot.setDomainGridlinesVisible(false);
	plot.setOutlineVisible(false);
	plot.setRangeZeroBaselineVisible(false);
	plot.setDomainGridlinesVisible(false);
	plot.setBackgroundPaint(COLOR_INVISIBLE);
	plot.setBackgroundImageAlpha(0.0f);

	BarRenderer renderer = (BarRenderer) plot.getRenderer();
	renderer.setSeriesPaint(0, AttributeGuiTools.getColorForValueType(Ontology.NOMINAL));
	renderer.setBarPainter(new StandardBarPainter());
	renderer.setDrawBarOutline(true);
	renderer.setShadowVisible(false);

	return chart;
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:30,代碼來源:NominalAttributeStatisticsModel.java

示例2: visualizarSerieChartAsignRescateVict

import org.jfree.chart.plot.CategoryPlot; //導入方法依賴的package包/類
public void  visualizarSerieChartAsignRescateVict(Color color,CategoryDataset dataset) {
     ChartPanel chartPanel = new ChartPanel(chartNotifAsigResc);
     chartNotifAsigResc.setBackgroundPaint(Color.white);
    CategoryPlot plot = (CategoryPlot) chartNotifAsigResc.getPlot();
     plot.setBackgroundPaint(color);
     plot.setDataset(dataset);
     plot.setDomainGridlinePaint(Color.white);
     plot.setRangeGridlinePaint(Color.white);
     NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
     rangeAxis.setUpperMargin(0.15);
     CategoryItemRenderer renderer = plot.getRenderer();
     renderer.setItemLabelGenerator(new LabelGenerator(50.0));
     renderer.setItemLabelFont(new Font("Serif", Font.PLAIN, 8));
     renderer.setItemLabelsVisible(true);
     chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
   setContentPane(chartPanel);
   this.pack();
   RefineryUtilities.centerFrameOnScreen(this);
   this.setVisible(true);
}
 
開發者ID:Yarichi,項目名稱:Proyecto-DASI,代碼行數:21,代碼來源:VisualizacionJfreechart.java

示例3: visualizarSeriesTiemposRescateVictPorRobots

import org.jfree.chart.plot.CategoryPlot; //導入方法依賴的package包/類
public void  visualizarSeriesTiemposRescateVictPorRobots(CategoryDataset dataset) {
    JFreeChart chart = ChartFactory.createBarChart(
     "Tiempos de Rescate de Victimas por cada robot ", // chart title
     "Robots en el entorno", // domain axis label
     "Tiempo milisegundos", // range axis label
     dataset, // data
     PlotOrientation.VERTICAL, // orientation
     true, // include legend
     true, // tooltips?
     false // URLs?
     );
     ChartPanel chartPanel = new ChartPanel(chart);
     chart.setBackgroundPaint(Color.white);
     CategoryPlot plot = chart.getCategoryPlot();
     plot.setBackgroundPaint(Color.lightGray);
     plot.setDomainGridlinePaint(Color.white);
     plot.setRangeGridlinePaint(Color.white);
     NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
     rangeAxis.setUpperMargin(0.15);
     CategoryItemRenderer renderer = plot.getRenderer();
     renderer.setItemLabelGenerator(new LabelGenerator(50.0));
     renderer.setItemLabelFont(new Font("Serif", Font.PLAIN, 8));
     renderer.setItemLabelsVisible(true);
     chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
     this.visualizar(chartPanel);
}
 
開發者ID:Yarichi,項目名稱:Proyecto-DASI,代碼行數:27,代碼來源:VisualizacionJfreechart.java

示例4: visualizarSeriesEnergRescateVictPorRobots

import org.jfree.chart.plot.CategoryPlot; //導入方法依賴的package包/類
public void  visualizarSeriesEnergRescateVictPorRobots(CategoryDataset dataset) {
    JFreeChart chart = ChartFactory.createBarChart(
     "Tiempos de Rescate de Victimas por cada robot ", // chart title
     "Robots en el entorno", // domain axis label
     "Unidades de energ�a", // range axis label
     dataset, // data
     PlotOrientation.VERTICAL, // orientation
     true, // include legend
     true, // tooltips?
     false // URLs?
     );
     ChartPanel chartPanel = new ChartPanel(chart);
     chart.setBackgroundPaint(Color.white);
     CategoryPlot plot = chart.getCategoryPlot();
     plot.setBackgroundPaint(Color.lightGray);
     plot.setDomainGridlinePaint(Color.white);
     plot.setRangeGridlinePaint(Color.white);
     NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
     rangeAxis.setUpperMargin(0.15);
     CategoryItemRenderer renderer = plot.getRenderer();
     renderer.setItemLabelGenerator(new LabelGenerator(50.0));
     renderer.setItemLabelFont(new Font("Serif", Font.PLAIN, 8));
     renderer.setItemLabelsVisible(true);
     chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
     this.visualizar(chartPanel);
}
 
開發者ID:Yarichi,項目名稱:Proyecto-DASI,代碼行數:27,代碼來源:VisualizacionJfreechart.java

示例5: setPlotBackgroundColor

import org.jfree.chart.plot.CategoryPlot; //導入方法依賴的package包/類
private void setPlotBackgroundColor(Color backgroundColor) {
	JFreeChart chart = getCurrentChart();
	if (chart != null) {
		Plot plot = chart.getPlot();
		if (plot instanceof CategoryPlot) {
			CategoryPlot categoryPlot = (CategoryPlot) plot;
			categoryPlot.setBackgroundPaint(backgroundColor);
		} else {
			XYPlot xyPlot = (XYPlot) plot;
			xyPlot.setBackgroundPaint(backgroundColor);
		}
	}
}
 
開發者ID:transwarpio,項目名稱:rapidminer,代碼行數:14,代碼來源:JFreeChartPlotEngine.java

示例6: createBarChart

import org.jfree.chart.plot.CategoryPlot; //導入方法依賴的package包/類
private static  JFreeChart createBarChart(String title,String category,String value, CategoryDataset dataset) {   
	    JFreeChart chart = ChartFactory.createBarChart3D(title, // chart title   
	    			category, // domain axis label   
	    			value, // range axis label   
	                dataset, // data   
	                PlotOrientation.VERTICAL, // 圖標方向   
	                true, // 是否顯示legend   
	                true, // 是否顯示tooltips   
	                false // 是否顯示URLs   
	        );   
	    CategoryPlot plot = chart.getCategoryPlot();//設置圖的高級屬性 
	    plot.setBackgroundPaint(ChartColor.WHITE);
	    NumberAxis na= (NumberAxis)plot.getRangeAxis();
//	    na.setAutoTickUnitSelection(false);//設置小數點位數
	    na.setNumberFormatOverride(df);
//	    NumberTickUnit nt=new NumberTickUnit(1.22);
//	    na.setTickUnit(nt);
//	    plot.setRangeAxis(na);
	    BarRenderer3D renderer = new BarRenderer3D();//3D屬性修改 
	    renderer.setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator());
	    renderer.setBaseItemLabelsVisible(true);
	    renderer.setItemLabelAnchorOffset(10);
	    renderer.setBasePositiveItemLabelPosition(new ItemLabelPosition(ItemLabelAnchor.OUTSIDE12, TextAnchor.BASELINE_CENTER));
		renderer.setSeriesPaint(0,new Color(34,139,34));
		renderer.setSeriesPaint(1,new Color(154,205,50));
		renderer.setSeriesPaint(2,new Color(0,255,0));
		renderer.setSeriesPaint(3,new Color(127,255,212));
	    plot.setRenderer(renderer);//將修改後的屬性值保存到圖中 
	    return chart;   
	}
 
開發者ID:dbiir,項目名稱:ts-benchmark,代碼行數:31,代碼來源:ChartBizUtil.java

示例7: createChart

import org.jfree.chart.plot.CategoryPlot; //導入方法依賴的package包/類
private JFreeChart createChart(CategoryDataset dataset, HttpServletRequest request) {
    JFreeChart chart = ChartFactory.createBarChart(null, null, null, dataset, PlotOrientation.HORIZONTAL, false, false, false);

    CategoryPlot plot = chart.getCategoryPlot();
    Paint background = new GradientPaint(0, 0, Color.lightGray, 0, IMAGE_MIN_HEIGHT, Color.white);
    plot.setBackgroundPaint(background);
    plot.setDomainGridlinePaint(Color.white);
    plot.setDomainGridlinesVisible(true);
    plot.setRangeGridlinePaint(Color.white);
    plot.setRangeAxisLocation(AxisLocation.BOTTOM_OR_LEFT);

    LogarithmicAxis rangeAxis = new LogarithmicAxis(null);
    rangeAxis.setStrictValuesFlag(false);
    rangeAxis.setAllowNegativesFlag(true);
    plot.setRangeAxis(rangeAxis);

    // Disable bar outlines.
    BarRenderer renderer = (BarRenderer) plot.getRenderer();
    renderer.setDrawBarOutline(false);

    // Set up gradient paint for series.
    GradientPaint gp0 = new GradientPaint(
            0.0f, 0.0f, Color.blue,
            0.0f, 0.0f, new Color(0, 0, 64)
    );
    renderer.setSeriesPaint(0, gp0);

    // Rotate labels.
    CategoryAxis domainAxis = plot.getDomainAxis();
    domainAxis.setCategoryLabelPositions(CategoryLabelPositions.createUpRotationLabelPositions(Math.PI / 6.0));

    // Set theme-specific colors.
    Color bgColor = getBackground(request);
    Color fgColor = getForeground(request);

    chart.setBackgroundPaint(bgColor);

    domainAxis.setTickLabelPaint(fgColor);
    domainAxis.setTickMarkPaint(fgColor);
    domainAxis.setAxisLinePaint(fgColor);

    rangeAxis.setTickLabelPaint(fgColor);
    rangeAxis.setTickMarkPaint(fgColor);
    rangeAxis.setAxisLinePaint(fgColor);

    return chart;
}
 
開發者ID:airsonic,項目名稱:airsonic,代碼行數:48,代碼來源:UserChartController.java

示例8: crearBarChartCosteEnergiaRescateVictimas

import org.jfree.chart.plot.CategoryPlot; //導入方法依賴的package包/類
public void crearBarChartCosteEnergiaRescateVictimas(CategoryDataset dataset) {
         JFreeChart chart = ChartFactory.createBarChart(
        "Energ�a consumida para salvar las victimas ", // chart title
        "Victimas ordenadas por tiempo de rescate", // domain axis label
        "Energ�a consumida", // range axis label
        dataset, // data
        PlotOrientation.VERTICAL, // orientation
        true, // include legend
        true, // tooltips?
        false // URLs?
        );
        ChartPanel chartPanel = new ChartPanel(chart);
        chart.setBackgroundPaint(Color.white);
        CategoryPlot plot = chart.getCategoryPlot();
        plot.setBackgroundPaint(Color.lightGray);
        plot.setDomainGridlinePaint(Color.white);
        plot.setRangeGridlinePaint(Color.white);
        NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
        rangeAxis.setUpperMargin(0.15);
        CategoryItemRenderer renderer = plot.getRenderer();
        renderer.setItemLabelGenerator(new LabelGenerator(50.0));
        renderer.setItemLabelFont(new Font("Serif", Font.PLAIN, 8));
        renderer.setItemLabelsVisible(true);
        chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
      setContentPane(chartPanel);
      this.pack();
      RefineryUtilities.centerFrameOnScreen(this);
      this.setVisible(true);
//        return chart;
            }
 
開發者ID:Yarichi,項目名稱:Proyecto-DASI,代碼行數:31,代碼來源:VisualizacionJfreechart.java

示例9: crearChartAsignRescateVict

import org.jfree.chart.plot.CategoryPlot; //導入方法依賴的package包/類
public  JFreeChart crearChartAsignRescateVict(CategoryDataset dataset) {
       
       chartNotifAsigResc = ChartFactory.createLineChart(
          "Tiempos de Rescate de Victimas ",      // chart title Titulo local del grafico
          "Victimas Rescatadas  en Entorno",                      // x axis label
          "Tiempo milisegundos",                      // y axis label
          dataset,                  // data
          PlotOrientation.VERTICAL,
          true,                     // include legend
          true,                     // tooltips
          false                     // urls
      );

      // NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART...
      ChartPanel chartPanel = new ChartPanel(chartNotifAsigResc,false);
        chartNotifAsigResc.setBackgroundPaint(Color.white);
//       CategoryPlot plot = (CategoryPlot) chartNotifAsigResc.getPlot();
        CategoryPlot plot = chartNotifAsigResc.getCategoryPlot();
        plot.setBackgroundPaint(Color.lightGray);
        plot.setDomainGridlinePaint(Color.white);
        plot.setRangeGridlinePaint(Color.white);
        NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
        rangeAxis.setUpperMargin(0.15);
        CategoryItemRenderer renderer = plot.getRenderer();
        renderer.setItemLabelGenerator(new LabelGenerator(50.0));
        renderer.setItemLabelFont(new Font("Serif", Font.PLAIN, 8));
        renderer.setItemLabelsVisible(true);
        chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
      setContentPane(chartPanel);
      this.pack();
      RefineryUtilities.centerFrameOnScreen(this);
      this.setVisible(true);
      return chartNotifAsigResc;
    }
 
開發者ID:Yarichi,項目名稱:Proyecto-DASI,代碼行數:35,代碼來源:VisualizacionJfreechart.java

示例10: makePlot

import org.jfree.chart.plot.CategoryPlot; //導入方法依賴的package包/類
@Override
protected Plot makePlot(final JFreeChartBuilder.PlotParameters parameters) {

    final DefaultKeyedValues2DDataset tmpDataset = this.getDataset();

    final CategoryAxis tmpCategoryAxis = this.makeCategoryAxis(domain);

    final ValueAxis tmpValueAxis = this.makeValueAxis(range);

    final StackedBarRenderer tmpRenderer = new StackedBarRenderer();
    tmpRenderer.setBarPainter(new StandardBarPainter());
    tmpRenderer.setShadowVisible(false);

    if (this.isTooltips()) {
        tmpRenderer.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator());
    }
    if (this.isUrls()) {
        tmpRenderer.setBaseItemURLGenerator(new StandardCategoryURLGenerator());
    }

    this.setColours(tmpRenderer, tmpDataset);

    final CategoryPlot retVal = new CategoryPlot(tmpDataset, tmpCategoryAxis, tmpValueAxis, tmpRenderer);
    retVal.setOrientation(parameters.getOrientation());
    retVal.setBackgroundPaint(parameters.getBackground());
    retVal.setOutlinePaint(parameters.getOutline());

    return retVal;
}
 
開發者ID:optimatika,項目名稱:ojAlgo-extensions,代碼行數:30,代碼來源:StackedBarChartBuilder.java

示例11: makePlot

import org.jfree.chart.plot.CategoryPlot; //導入方法依賴的package包/類
@Override
protected Plot makePlot(final JFreeChartBuilder.PlotParameters parameters) {

    final DefaultKeyedValues2DDataset tmpDataset = this.getDataset();

    final CategoryAxis tmpCategoryAxis = this.makeCategoryAxis(domain);

    final NumberAxis tmpValueAxis = this.makeValueAxis(range);

    final BarRenderer tmpRenderer = new BarRenderer();
    tmpRenderer.setBarPainter(new StandardBarPainter());
    tmpRenderer.setShadowVisible(false);
    if (this.isTooltips()) {
        tmpRenderer.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator());
    }
    if (this.isUrls()) {
        tmpRenderer.setBaseItemURLGenerator(new StandardCategoryURLGenerator());
    }

    this.setColours(tmpRenderer, tmpDataset);

    final CategoryPlot retVal = new CategoryPlot(tmpDataset, tmpCategoryAxis, tmpValueAxis, tmpRenderer);
    retVal.setOrientation(parameters.getOrientation());
    retVal.setBackgroundPaint(parameters.getBackground());
    retVal.setOutlinePaint(parameters.getOutline());

    return retVal;
}
 
開發者ID:optimatika,項目名稱:ojAlgo-extensions,代碼行數:29,代碼來源:BarChartBuilder.java

示例12: createChart

import org.jfree.chart.plot.CategoryPlot; //導入方法依賴的package包/類
/**
 * Creates a sample chart.
 * 
 * @param dataset  the dataset.
 * 
 * @return The chart.
 */
private static JFreeChart createChart(CategoryDataset dataset) {
    
    // create the chart...
    JFreeChart chart = ChartFactory.createBarChart(
        "Bar Chart Demo",         // chart title
        "Category",               // domain axis label
        "Value",                  // range axis label
        dataset,                  // data
        PlotOrientation.VERTICAL, // orientation
        true,                     // include legend
        true,                     // tooltips?
        false                     // URLs?
    );

    // NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART...

    // set the background color for the chart...
    chart.setBackgroundPaint(Color.white);

    // get a reference to the plot for further customisation...
    CategoryPlot plot = (CategoryPlot) chart.getPlot();
    plot.setBackgroundPaint(Color.lightGray);
    plot.setDomainGridlinePaint(Color.white);
    plot.setDomainGridlinesVisible(true);
    plot.setRangeGridlinePaint(Color.white);

    // set the range axis to display integers only...
    final NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
    rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());

    // disable bar outlines...
    BarRenderer renderer = (BarRenderer) plot.getRenderer();
    renderer.setDrawBarOutline(false);

    CategoryAxis domainAxis = plot.getDomainAxis();
    domainAxis.setCategoryLabelPositions(
        CategoryLabelPositions.createUpRotationLabelPositions(Math.PI / 6.0)
    );
    // OPTIONAL CUSTOMISATION COMPLETED.
    
    return chart;
    
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:51,代碼來源:SWTBarChartDemo1.java

示例13: createChart

import org.jfree.chart.plot.CategoryPlot; //導入方法依賴的package包/類
/**
 * Creates a sample chart.
 * 
 * @param dataset  the dataset.
 * 
 * @return The chart.
 */
private static JFreeChart createChart(CategoryDataset dataset) {
    
    // create the chart...
    JFreeChart chart = ChartFactory.createBarChart(
        "Bar Chart Demo 1",       // chart title
        "Category",               // domain axis label
        "Value",                  // range axis label
        dataset,                  // data
        PlotOrientation.VERTICAL, // orientation
        true,                     // include legend
        true,                     // tooltips?
        false                     // URLs?
    );

    // NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART...

    // set the background color for the chart...
    chart.setBackgroundPaint(Color.white);

    // get a reference to the plot for further customisation...
    CategoryPlot plot = (CategoryPlot) chart.getPlot();
    plot.setBackgroundPaint(Color.lightGray);
    plot.setDomainGridlinePaint(Color.white);
    plot.setDomainGridlinesVisible(true);
    plot.setRangeGridlinePaint(Color.white);

    // ******************************************************************
    //  More than 150 demo applications are included with the JFreeChart
    //  Developer Guide...for more information, see:
    //
    //  >   http://www.object-refinery.com/jfreechart/guide.html
    //
    // ******************************************************************
    
    // set the range axis to display integers only...
    final NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
    rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());

    // disable bar outlines...
    BarRenderer renderer = (BarRenderer) plot.getRenderer();
    renderer.setDrawBarOutline(false);
    
    // set up gradient paints for series...
    GradientPaint gp0 = new GradientPaint(0.0f, 0.0f, Color.blue, 
            0.0f, 0.0f, new Color(0, 0, 64));
    GradientPaint gp1 = new GradientPaint(0.0f, 0.0f, Color.green, 
            0.0f, 0.0f, new Color(0, 64, 0));
    GradientPaint gp2 = new GradientPaint(0.0f, 0.0f, Color.red, 
            0.0f, 0.0f, new Color(64, 0, 0));
    renderer.setSeriesPaint(0, gp0);
    renderer.setSeriesPaint(1, gp1);
    renderer.setSeriesPaint(2, gp2);

    CategoryAxis domainAxis = plot.getDomainAxis();
    domainAxis.setCategoryLabelPositions(
            CategoryLabelPositions.createUpRotationLabelPositions(
                    Math.PI / 6.0));
    // OPTIONAL CUSTOMISATION COMPLETED.
    
    return chart;
    
}
 
開發者ID:parabuild-ci,項目名稱:parabuild-ci,代碼行數:70,代碼來源:BarChartDemo1.java

示例14: createChart

import org.jfree.chart.plot.CategoryPlot; //導入方法依賴的package包/類
/**
 * Creates a sample chart.
 * @param dataset  the dataset.
 * @return The chart.
 */
private JFreeChart createChart(CategoryDataset dataset) {
    // create the chart...
    JFreeChart chart = ChartFactory.createBarChart(
        "jaffa.sf.net 2005 Statistics",// chart title
        "Month",                  // domain axis label
        "Hits",                  // range axis label
        dataset,                  // data
        PlotOrientation.VERTICAL, // orientation
        true,                     // include legend
        true,                     // tooltips?
        false                     // URLs?
    );
 
    // NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART...
 
    // set the background color for the chart...
    chart.setBackgroundPaint(Color.white);
 
    // get a reference to the plot for further customisation...
    CategoryPlot plot = chart.getCategoryPlot();
    plot.setBackgroundPaint(Color.lightGray);
    plot.setDomainGridlinePaint(Color.white);
    plot.setDomainGridlinesVisible(true);
    plot.setRangeGridlinePaint(Color.white);
 
    // set the range axis to display integers only...
    final NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
    rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
 
    // disable bar outlines...
    BarRenderer renderer = (BarRenderer) plot.getRenderer();
    renderer.setDrawBarOutline(false);
 
    // set up gradient paints for series...
    GradientPaint gp0 = new GradientPaint(
        0.0f, 0.0f, Color.blue,
        0.0f, 0.0f, new Color(0, 0, 64)
    );
    GradientPaint gp1 = new GradientPaint(
        0.0f, 0.0f, Color.green,
        0.0f, 0.0f, new Color(0, 64, 0)
    );
    GradientPaint gp2 = new GradientPaint(
        0.0f, 0.0f, Color.red,
        0.0f, 0.0f, new Color(64, 0, 0)
    );
    renderer.setSeriesPaint(0, gp0);
    renderer.setSeriesPaint(1, gp1);
    renderer.setSeriesPaint(2, gp2);
 
    CategoryAxis domainAxis = plot.getDomainAxis();
    domainAxis.setCategoryLabelPositions(
        CategoryLabelPositions.createUpRotationLabelPositions(Math.PI / 6.0)
    );
    // OPTIONAL CUSTOMISATION COMPLETED.
 
    return chart;
}
 
開發者ID:jaffa-projects,項目名稱:jaffa-framework,代碼行數:64,代碼來源:ImageDom.java


注:本文中的org.jfree.chart.plot.CategoryPlot.setBackgroundPaint方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。