• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java StandardBarPainter类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.jfree.chart.renderer.category.StandardBarPainter的典型用法代码示例。如果您正苦于以下问题:Java StandardBarPainter类的具体用法?Java StandardBarPainter怎么用?Java StandardBarPainter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



StandardBarPainter类属于org.jfree.chart.renderer.category包,在下文中一共展示了StandardBarPainter类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: configureBarRenderer

import org.jfree.chart.renderer.category.StandardBarPainter; //导入依赖的package包/类
private static void configureBarRenderer(BarRenderer renderer, ValueSource valueSource, PlotInstance plotInstance) {
	StandardBarPainter barPainter = new StandardBarPainter();
	renderer.setBarPainter(barPainter);
	renderer.setGradientPaintTransformer(null);

	ValueSourceData valueSourceData = plotInstance.getPlotData().getValueSourceData(valueSource);
	int seriesCount = valueSourceData.getSeriesCount();
	DimensionConfig domainConfig = valueSource.getDomainConfig();
	DimensionConfig colorDimensionConfig = plotInstance.getCurrentPlotConfigurationClone().getDimensionConfig(
			PlotDimension.COLOR);
	SeriesFormat seriesFormat = valueSource.getSeriesFormat();

	// Loop all series and set series format.
	// Format based on dimension configs will be set later on in initFormatDelegate().
	for (int seriesIdx = 0; seriesIdx < seriesCount; ++seriesIdx) {
		// configure series paint if necessary
		if (!SeriesFormat.calculateIndividualFormatForEachItem(domainConfig, colorDimensionConfig)) {
			renderer.setSeriesPaint(seriesIdx, seriesFormat.getAreaFillPaint());
		}

		// configure general style of the bars
		renderer.setShadowVisible(false);
		renderer.setSeriesOutlinePaint(seriesIdx, PlotConfiguration.DEFAULT_SERIES_OUTLINE_PAINT);
	}
	renderer.setDrawBarOutline(true);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:27,代码来源:ChartRendererFactory.java


示例2: createBarChart

import org.jfree.chart.renderer.category.StandardBarPainter; //导入依赖的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


示例3: setChartTheme

import org.jfree.chart.renderer.category.StandardBarPainter; //导入依赖的package包/类
/**
 * Sets the current chart theme.  This will be applied to all new charts
 * created via methods in this class.
 *
 * @param theme  the theme (<code>null</code> not permitted).
 *
 * @see #getChartTheme()
 * @see ChartUtilities#applyCurrentTheme(JFreeChart)
 *
 * @since 1.0.11
 */
public static void setChartTheme(ChartTheme theme) {
    ParamChecks.nullNotPermitted(theme, "theme");
    currentTheme = theme;

    // here we do a check to see if the user is installing the "Legacy"
    // theme, and reset the bar painters in that case...
    if (theme instanceof StandardChartTheme) {
        StandardChartTheme sct = (StandardChartTheme) theme;
        if (sct.getName().equals("Legacy")) {
            BarRenderer.setDefaultBarPainter(new StandardBarPainter());
            XYBarRenderer.setDefaultBarPainter(new StandardXYBarPainter());
        }
        else {
            BarRenderer.setDefaultBarPainter(new GradientBarPainter());
            XYBarRenderer.setDefaultBarPainter(new GradientXYBarPainter());
        }
    }
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:30,代码来源:ChartFactory.java


示例4: setChartTheme

import org.jfree.chart.renderer.category.StandardBarPainter; //导入依赖的package包/类
/**
 * Sets the current chart theme.  This will be applied to all new charts
 * created via methods in this class.
 *
 * @param theme  the theme ({@code null} not permitted).
 *
 * @see #getChartTheme()
 * @see ChartUtils#applyCurrentTheme(JFreeChart)
 *
 * @since 1.0.11
 */
public static void setChartTheme(ChartTheme theme) {
    Args.nullNotPermitted(theme, "theme");
    currentTheme = theme;

    // here we do a check to see if the user is installing the "Legacy"
    // theme, and reset the bar painters in that case...
    if (theme instanceof StandardChartTheme) {
        StandardChartTheme sct = (StandardChartTheme) theme;
        if (sct.getName().equals("Legacy")) {
            BarRenderer.setDefaultBarPainter(new StandardBarPainter());
            XYBarRenderer.setDefaultBarPainter(new StandardXYBarPainter());
        }
        else {
            BarRenderer.setDefaultBarPainter(new GradientBarPainter());
            XYBarRenderer.setDefaultBarPainter(new GradientXYBarPainter());
        }
    }
}
 
开发者ID:jfree,项目名称:jfreechart,代码行数:30,代码来源:ChartFactory.java


示例5: applyTo

import org.jfree.chart.renderer.category.StandardBarPainter; //导入依赖的package包/类
/**
 * Apply the chart style to the chart passed as parameter.
 *
 * @param chart the chart to apply the style to (is modified by the method)
 * @param dataset the dataset associated with the chart
 */
public void applyTo(JFreeChart chart, final DefaultCategoryDataset dataset) {
    CategoryPlot plot = (CategoryPlot) chart.getPlot();
    BarRenderer renderer = (BarRenderer) plot.getRenderer();
    renderer.setBarPainter(new StandardBarPainter());
    renderer.setDrawBarOutline(false);
    renderer.setShadowVisible(false);
    int seriesCount = dataset.getRowCount();
    int coloursSize = colours.size();
    int colourMod;
    for (int series = 0; series < seriesCount; series++) {
        colourMod = series % coloursSize;
        renderer.setSeriesPaint(series, this.colours.get(colourMod));
    }

}
 
开发者ID:c2mon,项目名称:c2mon-web-ui,代码行数:22,代码来源:BarChartStyle.java


示例6: GraphData

import org.jfree.chart.renderer.category.StandardBarPainter; //导入依赖的package包/类
public GraphData(String printer_id, String outDir, boolean warn, String label,String yLabel, ArrayList<String> learnSpecs) {
	this.outDir = outDir;
	this.printer_id = printer_id;
	this.warn = warn;
	this.learnSpecs = learnSpecs;
	graphProbs = new ArrayList<String>();
	probGraphed = new LinkedList<GraphProbs>();
	chart = ChartFactory.createBarChart(label, "", yLabel, new DefaultCategoryDataset(), PlotOrientation.VERTICAL, true, true, false);
	applyChartTheme();
	((BarRenderer) chart.getCategoryPlot().getRenderer()).setBarPainter(new StandardBarPainter());
	chart.setBackgroundPaint(new java.awt.Color(238, 238, 238));
	chart.getPlot().setBackgroundPaint(java.awt.Color.WHITE);
	chart.getCategoryPlot().setRangeGridlinePaint(java.awt.Color.LIGHT_GRAY);
	legend = chart.getLegend();
	timeSeriesPlot = false;
	averageOrder = null;
}
 
开发者ID:MyersResearchGroup,项目名称:iBioSim,代码行数:18,代码来源:GraphData.java


示例7: initializeTheme

import org.jfree.chart.renderer.category.StandardBarPainter; //导入依赖的package包/类
public static StandardChartTheme initializeTheme() {
    String fontName = "Arial";
    StandardChartTheme theme = (StandardChartTheme) org.jfree.chart.StandardChartTheme.createJFreeTheme();
    theme.setExtraLargeFont(new Font(fontName, Font.PLAIN, 24)); // title
    theme.setLargeFont(new Font(fontName, Font.PLAIN, 20)); // axis-title
    theme.setRegularFont(new Font(fontName, Font.PLAIN, 16));
    theme.setSmallFont(new Font(fontName, Font.PLAIN, 12));
    theme.setRangeGridlinePaint(Color.decode("#C0C0C0"));
    theme.setPlotBackgroundPaint(Color.white);
    theme.setChartBackgroundPaint(Color.white);
    theme.setGridBandPaint(Color.red);
    theme.setAxisOffset(new RectangleInsets(0, 0, 0, 0));
    theme.setBarPainter(new StandardBarPainter());
    theme.setAxisLabelPaint(Color.decode("#666666"));
    return theme;
}
 
开发者ID:OWASP,项目名称:Benchmark,代码行数:17,代码来源:ScatterPlot.java


示例8: setChartTheme

import org.jfree.chart.renderer.category.StandardBarPainter; //导入依赖的package包/类
/**
 * Sets the current chart theme.  This will be applied to all new charts
 * created via methods in this class.
 *
 * @param theme  the theme (<code>null</code> not permitted).
 *
 * @see #getChartTheme()
 * @see ChartUtilities#applyCurrentTheme(JFreeChart)
 *
 * @since 1.0.11
 */
public static void setChartTheme(ChartTheme theme) {
    if (theme == null) {
        throw new IllegalArgumentException("Null 'theme' argument.");
    }
    currentTheme = theme;

    // here we do a check to see if the user is installing the "Legacy"
    // theme, and reset the bar painters in that case...
    if (theme instanceof StandardChartTheme) {
        StandardChartTheme sct = (StandardChartTheme) theme;
        if (sct.getName().equals("Legacy")) {
            BarRenderer.setDefaultBarPainter(new StandardBarPainter());
            XYBarRenderer.setDefaultBarPainter(new StandardXYBarPainter());
        }
        else {
            BarRenderer.setDefaultBarPainter(new GradientBarPainter());
            XYBarRenderer.setDefaultBarPainter(new GradientXYBarPainter());
        }
    }
}
 
开发者ID:lulab,项目名称:PI,代码行数:32,代码来源:ChartFactory.java


示例9: enableFlatLook

import org.jfree.chart.renderer.category.StandardBarPainter; //导入依赖的package包/类
public static void enableFlatLook(final boolean flat) {
	if (flat) {
		BarRenderer.setDefaultBarPainter(new StandardBarPainter());
		BarRenderer.setDefaultShadowsVisible(false);
		XYBarRenderer.setDefaultBarPainter(new StandardXYBarPainter());
		XYBarRenderer.setDefaultShadowsVisible(false);
		StackedBarRenderer.setDefaultBarPainter(new StandardBarPainter());
		StackedBarRenderer.setDefaultShadowsVisible(false);
	} else {
		BarRenderer.setDefaultBarPainter(new GradientBarPainter());
		BarRenderer.setDefaultShadowsVisible(true);
		XYBarRenderer.setDefaultBarPainter(new GradientXYBarPainter());
		XYBarRenderer.setDefaultShadowsVisible(true);
		StackedBarRenderer.setDefaultBarPainter(new GradientBarPainter());
		StackedBarRenderer.setDefaultShadowsVisible(true);
	}
}
 
开发者ID:gama-platform,项目名称:gama,代码行数:18,代码来源:ChartJFreeChartOutputHistogram.java


示例10: configureBarRenderer

import org.jfree.chart.renderer.category.StandardBarPainter; //导入依赖的package包/类
private void configureBarRenderer(BarRenderer barRenderer) {
    barRenderer.setBarPainter(new StandardBarPainter());
    barRenderer.setSeriesPaint(0, Color.black);
    barRenderer.setSeriesPaint(1, Color.blue);
    barRenderer.setSeriesPaint(2, Color.cyan);
    barRenderer.setSeriesPaint(3, Color.darkGray);
    barRenderer.setSeriesPaint(4, Color.gray);
    barRenderer.setSeriesPaint(5, Color.green);
    barRenderer.setSeriesPaint(6, Color.lightGray);
    barRenderer.setSeriesPaint(7, Color.magenta);
    barRenderer.setSeriesPaint(8, Color.orange);
    barRenderer.setSeriesPaint(9, Color.red);
    barRenderer.setDrawBarOutline(false);
    barRenderer.setShadowVisible(false);
    barRenderer.setBaseItemLabelGenerator(sectorProfileLabelGenerator);
    barRenderer.setBaseItemLabelsVisible(true);
}
 
开发者ID:objektwerks,项目名称:swing,代码行数:18,代码来源:SectorProfileChartPanel.java


示例11: customizeRenderer

import org.jfree.chart.renderer.category.StandardBarPainter; //导入依赖的package包/类
/** Customize renderer. */
private void customizeRenderer(CategoryPlot plot) {
	BarRenderer renderer = (BarRenderer) plot.getRenderer();
	renderer.setMaximumBarWidth(0.5);
	renderer.setSeriesPaint(0, Color.BLACK);

	renderer.setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator());
	renderer.setBaseItemLabelsVisible(true);
	renderer.setBaseItemLabelPaint(Color.white);
	renderer.setBasePositiveItemLabelPosition(new ItemLabelPosition(
			ItemLabelAnchor.CENTER, TextAnchor.CENTER, TextAnchor.CENTER,
			0.0));

	renderer.setBarPainter(new StandardBarPainter());
	renderer.setShadowVisible(false);
}
 
开发者ID:vimaier,项目名称:conqat,代码行数:17,代码来源:BulletChartCreator.java


示例12: createLocationFormatChart

import org.jfree.chart.renderer.category.StandardBarPainter; //导入依赖的package包/类
/**
 * Creates chart (JFreeChart object) from dataset. Is used when Chart Type "Location-Format" or "Format-Location" is selected.
 * 
 * @param collection Collection that provides all data that should be displayed.
 * @param unit Unit: kWh or kWh/TNF
 * @return Returns finished JFreeChart object.
 */
private JFreeChart createLocationFormatChart(DefaultCategoryDataset collection,String unit){

	JFreeChart barChart = ChartFactory.createBarChart("Production Consumption","",
			("1".equals(unit)?"Energy Consumption [kWh]":("2".equals(unit)?"Energy Consumption [kWh/TNF]":("3".equals(unit)?"Produced Pieces [TNF]":""))),
			collection, PlotOrientation.VERTICAL, true, true, false);

	//graphical modifications for BarChart
	barChart.setBackgroundPaint(Color.white);
	CategoryPlot plot = barChart.getCategoryPlot();
	plot.setBackgroundPaint(Color.white);
	plot.setDomainGridlinePaint(Color.white);
	plot.setRangeGridlinePaint(Color.white);
	plot.setAxisOffset(new RectangleInsets(0, 0, 0, 0));
	plot.setShadowGenerator(null);

	//Barmodifications
	BarRenderer renderer=(BarRenderer) plot.getRenderer();
	renderer.setBarPainter(new StandardBarPainter());
	renderer.setItemMargin(0);
	renderer.setShadowVisible(false);
	plot.setRenderer(renderer);

	return barChart;

}
 
开发者ID:Jather90,项目名称:AMOS_proj5,代码行数:33,代码来源:ChartRenderer.java


示例13: configureBarRenderer

import org.jfree.chart.renderer.category.StandardBarPainter; //导入依赖的package包/类
private static void configureBarRenderer(BarRenderer renderer, ValueSource valueSource, PlotInstance plotInstance) {
	StandardBarPainter barPainter = new StandardBarPainter();
	renderer.setBarPainter(barPainter);
	renderer.setGradientPaintTransformer(null);

	ValueSourceData valueSourceData = plotInstance.getPlotData().getValueSourceData(valueSource);
	int seriesCount = valueSourceData.getSeriesCount();
	DimensionConfig domainConfig = valueSource.getDomainConfig();
	DimensionConfig colorDimensionConfig = plotInstance.getCurrentPlotConfigurationClone().getDimensionConfig(PlotDimension.COLOR);
	SeriesFormat seriesFormat = valueSource.getSeriesFormat();

	// Loop all series and set series format.
	// Format based on dimension configs will be set later on in initFormatDelegate().
	for(int seriesIdx = 0; seriesIdx < seriesCount; ++seriesIdx) {
		// configure series paint if necessary
		if (!SeriesFormat.calculateIndividualFormatForEachItem(domainConfig, colorDimensionConfig)) {
			renderer.setSeriesPaint(seriesIdx, seriesFormat.getAreaFillPaint());
		}

		// configure general style of the bars
		renderer.setShadowVisible(false);
		renderer.setSeriesOutlinePaint(seriesIdx, PlotConfiguration.DEFAULT_SERIES_OUTLINE_PAINT);
	}
	renderer.setDrawBarOutline(true);
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:26,代码来源:ChartRendererFactory.java


示例14: createChart

import org.jfree.chart.renderer.category.StandardBarPainter; //导入依赖的package包/类
public Drawable createChart(ADCDataset dataset) {
  final JFreeChart chart = ChartFactory.createBarChart(
      dataset.get(Attribute.TITLE),
      dataset.get(Attribute.X_AXIS_LABEL),
      dataset.get(Attribute.Y_AXIS_LABEL),
      dataset,
      PlotOrientation.VERTICAL,
      true, false, false);
  final CategoryPlot plot = chart.getCategoryPlot();
  plot.setBackgroundPaint(Color.white);
  plot.setDomainGridlinePaint(Color.lightGray);
  plot.setRangeGridlinePaint(Color.lightGray);
  ValueAxis raxis = plot.getRangeAxis();
  raxis.setRange(0, 100.0);
  CategoryAxis cAxis = plot.getDomainAxis();
  cAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_45);
  BarRenderer renderer = (BarRenderer)plot.getRenderer();
  renderer.setSeriesPaint(0, Colors.fromHex("#0AA1D8"));
  renderer.setSeriesPaint(1, Colors.fromHex("#932832"));
  renderer.setSeriesPaint(2, Colors.fromHex("#94BA4D"));
  renderer.setBarPainter(new StandardBarPainter());
  renderer.setItemMargin(0.01);
  return new JFreeChartDrawable(chart, new Dimension(750, 500));
}
 
开发者ID:uq-eresearch,项目名称:aorra,代码行数:25,代码来源:MarineBarChart.java


示例15: createChart

import org.jfree.chart.renderer.category.StandardBarPainter; //导入依赖的package包/类
public static Drawable createChart(ADCDataset dataset, Dimension dimension) {
    final JFreeChart chart = ChartFactory.createBarChart(
            dataset.get(Attribute.TITLE),// chart title
            dataset.get(Attribute.X_AXIS_LABEL),// domain axis label
            dataset.get(Attribute.Y_AXIS_LABEL),// range axis label
            dataset,                  // data
            PlotOrientation.VERTICAL, // orientation
            true,                    // include legend
            false,                     // tooltips?
            false                     // URLs?
        );
    chart.setBackgroundPaint(Color.white);
    final CategoryPlot plot = chart.getCategoryPlot();
    plot.setBackgroundPaint(Color.white);
    plot.setDomainGridlinePaint(Color.lightGray);
    plot.setRangeGridlinePaint(Color.lightGray);
    final BarRenderer renderer = (BarRenderer)plot.getRenderer();
    Colors.setSeriesPaint(renderer, dataset.get(Attribute.SERIES_COLORS));
    renderer.setItemMargin(0);
    renderer.setBarPainter(new StandardBarPainter());
    final CategoryAxis cAxis = plot.getDomainAxis();
    cAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_45);
    chart.getTitle().setFont(cAxis.getLabelFont());
    chart.getLegend().setMargin(2, 60, 2, 20);
    return new JFreeChartDrawable(chart, dimension);
}
 
开发者ID:uq-eresearch,项目名称:aorra,代码行数:27,代码来源:WetlandsRemaing.java


示例16: createChart

import org.jfree.chart.renderer.category.StandardBarPainter; //导入依赖的package包/类
public static Drawable createChart(ADCDataset dataset, Dimension dimension) {
    final JFreeChart chart = ChartFactory.createBarChart(
            dataset.get(Attribute.TITLE),        // chart title
            dataset.get(Attribute.X_AXIS_LABEL), // domain axis label
            dataset.get(Attribute.Y_AXIS_LABEL),// range axis label
            dataset,                  // data
            PlotOrientation.VERTICAL, // orientation
            true,                    // include legend
            false,                     // tooltips?
            false                     // URLs?
        );
    chart.setBackgroundPaint(Color.white);
    final CategoryPlot plot = chart.getCategoryPlot();
    plot.setBackgroundPaint(Color.white);
    plot.setDomainGridlinePaint(Color.lightGray);
    plot.setRangeGridlinePaint(Color.lightGray);
    final BarRenderer renderer = (BarRenderer)plot.getRenderer();
    Colors.setSeriesPaint(renderer, dataset.get(Attribute.SERIES_COLORS));
    renderer.setItemMargin(0);
    renderer.setBarPainter(new StandardBarPainter());
    final CategoryAxis cAxis = plot.getDomainAxis();
    cAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_45);
    return new JFreeChartDrawable(chart, dimension);
}
 
开发者ID:uq-eresearch,项目名称:aorra,代码行数:25,代码来源:RiparianFL.java


示例17: setChartTheme

import org.jfree.chart.renderer.category.StandardBarPainter; //导入依赖的package包/类
public static void setChartTheme() {
    StandardChartTheme chartTheme = new StandardChartTheme("CN");
    chartTheme.setExtraLargeFont(FONT);
    chartTheme.setRegularFont(FONT);
    chartTheme.setLargeFont(FONT);
    chartTheme.setSmallFont(FONT);
    chartTheme.setTitlePaint(new Color(51, 51, 51));
    chartTheme.setSubtitlePaint(new Color(85, 85, 85));

    chartTheme.setLegendBackgroundPaint(Color.WHITE);
    chartTheme.setLegendItemPaint(Color.BLACK);//
    chartTheme.setChartBackgroundPaint(Color.WHITE);

    Paint[] OUTLINE_PAINT_SEQUENCE = new Paint[]{Color.WHITE};
    DefaultDrawingSupplier drawingSupplier = new DefaultDrawingSupplier(CHART_COLORS, CHART_COLORS, OUTLINE_PAINT_SEQUENCE,
            DefaultDrawingSupplier.DEFAULT_STROKE_SEQUENCE, DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE,
            DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE);
    chartTheme.setDrawingSupplier(drawingSupplier);

    chartTheme.setPlotBackgroundPaint(Color.WHITE);
    chartTheme.setPlotOutlinePaint(Color.WHITE);
    chartTheme.setLabelLinkPaint(new Color(8, 55, 114));
    chartTheme.setLabelLinkStyle(PieLabelLinkStyle.CUBIC_CURVE);

    chartTheme.setAxisOffset(new RectangleInsets(5, 12, 5, 12));
    chartTheme.setDomainGridlinePaint(new Color(192, 208, 224));
    chartTheme.setRangeGridlinePaint(new Color(192, 192, 192));

    chartTheme.setBaselinePaint(Color.WHITE);
    chartTheme.setCrosshairPaint(Color.BLUE);
    chartTheme.setAxisLabelPaint(new Color(51, 51, 51));
    chartTheme.setTickLabelPaint(new Color(67, 67, 72));
    chartTheme.setBarPainter(new StandardBarPainter());
    chartTheme.setXYBarPainter(new StandardXYBarPainter());

    chartTheme.setItemLabelPaint(Color.black);
    chartTheme.setThermometerPaint(Color.white);

    ChartFactory.setChartTheme(chartTheme);
}
 
开发者ID:Fanping,项目名称:iveely.ml,代码行数:41,代码来源:ChartUtils.java


示例18: makePlot

import org.jfree.chart.renderer.category.StandardBarPainter; //导入依赖的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


示例19: makePlot

import org.jfree.chart.renderer.category.StandardBarPainter; //导入依赖的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


示例20: setBarPlotColours

import org.jfree.chart.renderer.category.StandardBarPainter; //导入依赖的package包/类
public static void setBarPlotColours(JFreeChart chart, int numberOfSections, Color baseColor) {
    Color color = baseColor;
    BarRenderer renderer = (BarRenderer) ((CategoryPlot) chart.getPlot()).getRenderer();
    renderer.setBarPainter(new StandardBarPainter());
    for (int i = 0; i < numberOfSections; i++) {
        renderer.setSeriesPaint(i, color);
        color = darken(color);
    }
}
 
开发者ID:IARC-CSU,项目名称:CanReg5,代码行数:10,代码来源:Tools.java



注:本文中的org.jfree.chart.renderer.category.StandardBarPainter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java UnsafeStringWriter类代码示例发布时间:2022-05-21
下一篇:
Java ConnectionProvider类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap