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


Java StandardChartTheme类代码示例

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


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

示例1: setDefaultChartFonts

import org.jfree.chart.StandardChartTheme; //导入依赖的package包/类
/**
 * Changes the font of {@link JFreeChart}s to Sans Serif. This method uses a
 * {@link StandardChartTheme} to do so, so any changes to the look of the chart must be done
 * after calling this method.
 * 
 * @param chart
 *            the chart to change fonts for
 */
protected static void setDefaultChartFonts(JFreeChart chart) {
	final ChartTheme chartTheme = StandardChartTheme.createJFreeTheme();

	if (StandardChartTheme.class.isAssignableFrom(chartTheme.getClass())) {
		StandardChartTheme standardTheme = (StandardChartTheme) chartTheme;
		// The default font used by JFreeChart cannot render japanese etc symbols
		final Font oldExtraLargeFont = standardTheme.getExtraLargeFont();
		final Font oldLargeFont = standardTheme.getLargeFont();
		final Font oldRegularFont = standardTheme.getRegularFont();
		final Font oldSmallFont = standardTheme.getSmallFont();

		final Font extraLargeFont = new Font(Font.SANS_SERIF, oldExtraLargeFont.getStyle(), oldExtraLargeFont.getSize());
		final Font largeFont = new Font(Font.SANS_SERIF, oldLargeFont.getStyle(), oldLargeFont.getSize());
		final Font regularFont = new Font(Font.SANS_SERIF, oldRegularFont.getStyle(), oldRegularFont.getSize());
		final Font smallFont = new Font(Font.SANS_SERIF, oldSmallFont.getStyle(), oldSmallFont.getSize());

		standardTheme.setExtraLargeFont(extraLargeFont);
		standardTheme.setLargeFont(largeFont);
		standardTheme.setRegularFont(regularFont);
		standardTheme.setSmallFont(smallFont);

		standardTheme.apply(chart);
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:33,代码来源:AbstractAttributeStatisticsModel.java

示例2: applyChartTheme

import org.jfree.chart.StandardChartTheme; //导入依赖的package包/类
public void applyChartTheme() {
	final StandardChartTheme chartTheme = (StandardChartTheme) org.jfree.chart.StandardChartTheme
			.createJFreeTheme();

	final Font oldExtraLargeFont = chartTheme.getExtraLargeFont();
	final Font oldLargeFont = chartTheme.getLargeFont();
	final Font oldRegularFont = chartTheme.getRegularFont();
	final Font oldSmallFont = chartTheme.getSmallFont();

	final Font extraLargeFont = new Font("Sans-serif", oldExtraLargeFont.getStyle(), oldExtraLargeFont.getSize());
	final Font largeFont = new Font("Sans-serif", oldLargeFont.getStyle(), oldLargeFont.getSize());
	final Font regularFont = new Font("Sans-serif", oldRegularFont.getStyle(), oldRegularFont.getSize());
	final Font smallFont = new Font("Sans-serif", oldSmallFont.getStyle(), oldSmallFont.getSize());

	chartTheme.setExtraLargeFont(extraLargeFont);
	chartTheme.setLargeFont(largeFont);
	chartTheme.setRegularFont(regularFont);
	chartTheme.setSmallFont(smallFont);

	chartTheme.apply(chart);
}
 
开发者ID:MyersResearchGroup,项目名称:iBioSim,代码行数:22,代码来源:GraphData.java

示例3: setDefaultChartFonts

import org.jfree.chart.StandardChartTheme; //导入依赖的package包/类
/**
 * Changes the font of {@link JFreeChart}s to Sans Serif. This method uses a
 * {@link StandardChartTheme} to do so, so any changes to the look of the chart must be done
 * after calling this method.
 *
 * @param chart
 *            the chart to change fonts for
 */
protected static void setDefaultChartFonts(JFreeChart chart) {
	final ChartTheme chartTheme = StandardChartTheme.createJFreeTheme();

	if (StandardChartTheme.class.isAssignableFrom(chartTheme.getClass())) {
		StandardChartTheme standardTheme = (StandardChartTheme) chartTheme;
		// The default font used by JFreeChart cannot render japanese etc symbols
		final Font oldExtraLargeFont = standardTheme.getExtraLargeFont();
		final Font oldLargeFont = standardTheme.getLargeFont();
		final Font oldRegularFont = standardTheme.getRegularFont();
		final Font oldSmallFont = standardTheme.getSmallFont();

		final Font extraLargeFont = FontTools.getFont(Font.SANS_SERIF, oldExtraLargeFont.getStyle(),
				oldExtraLargeFont.getSize());
		final Font largeFont = FontTools.getFont(Font.SANS_SERIF, oldLargeFont.getStyle(), oldLargeFont.getSize());
		final Font regularFont = FontTools.getFont(Font.SANS_SERIF, oldRegularFont.getStyle(), oldRegularFont.getSize());
		final Font smallFont = FontTools.getFont(Font.SANS_SERIF, oldSmallFont.getStyle(), oldSmallFont.getSize());

		standardTheme.setExtraLargeFont(extraLargeFont);
		standardTheme.setLargeFont(largeFont);
		standardTheme.setRegularFont(regularFont);
		standardTheme.setSmallFont(smallFont);

		standardTheme.apply(chart);
	}
}
 
开发者ID:rapidminer,项目名称:rapidminer-studio,代码行数:34,代码来源:AbstractAttributeStatisticsModel.java

示例4: initializeTheme

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

示例5: setChartTheme

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

示例6: createChart

import org.jfree.chart.StandardChartTheme; //导入依赖的package包/类
private JFreeChart createChart(String chartContent, String title, String yaxisName){
    //创建时序图对象
    XYSeries = new XYSeries(chartContent);
    XYSeriesCollection xySeriesCollection=new XYSeriesCollection(XYSeries);

    // 设置中文主题样式 解决乱码
    StandardChartTheme chartTheme = new StandardChartTheme("CN");
    // 设置标题字体
    chartTheme.setExtraLargeFont(font);
    // 设置图例的字体
    chartTheme.setRegularFont(font);
    // 设置轴向的字体
    chartTheme.setLargeFont(font);
    chartTheme.setSmallFont(font);

    ChartFactory.setChartTheme(chartTheme);

    JFreeChart jfreechart = ChartFactory.createXYLineChart(title,"帧数",yaxisName,xySeriesCollection);
    XYPlot xyplot = jfreechart.getXYPlot();
    //纵坐标设定
    ValueAxis valueaxis = xyplot.getDomainAxis();
    //自动设置数据轴数据范围
    valueaxis.setAutoRange(true);
    //数据轴固定数据范围 30s
    //valueaxis.setFixedAutoRange(100);

    valueaxis = xyplot.getRangeAxis();

    return jfreechart;
}
 
开发者ID:ZingBug,项目名称:NystagmusJava,代码行数:31,代码来源:WaveChart.java

示例7: createAreaChart

import org.jfree.chart.StandardChartTheme; //导入依赖的package包/类
/**
 *
 */
protected JFreeChart createAreaChart() throws JRException 
{
	ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
	JFreeChart jfreeChart = 
		ChartFactory.createAreaChart( 
			evaluateTextExpression(getChart().getTitleExpression()),
			evaluateTextExpression(((JRAreaPlot)getPlot()).getCategoryAxisLabelExpression()),
			evaluateTextExpression(((JRAreaPlot)getPlot()).getValueAxisLabelExpression()),
			(CategoryDataset)getDataset(),
			getPlot().getOrientationValue().getOrientation(),
			isShowLegend(),
			true,
			false);

	configureChart(jfreeChart, getPlot());
	JRAreaPlot areaPlot = (JRAreaPlot)getPlot();
	// Handle the axis formating for the category axis
	configureAxis(((CategoryPlot)jfreeChart.getPlot()).getDomainAxis(), areaPlot.getCategoryAxisLabelFont(),
			areaPlot.getCategoryAxisLabelColor(), areaPlot.getCategoryAxisTickLabelFont(),
			areaPlot.getCategoryAxisTickLabelColor(), areaPlot.getCategoryAxisTickLabelMask(), areaPlot.getCategoryAxisVerticalTickLabels(),
			areaPlot.getOwnCategoryAxisLineColor(), false,
			(Comparable<?>)evaluateExpression(areaPlot.getDomainAxisMinValueExpression()),
			(Comparable<?>)evaluateExpression(areaPlot.getDomainAxisMaxValueExpression()));

	// Handle the axis formating for the value axis
	configureAxis(((CategoryPlot)jfreeChart.getPlot()).getRangeAxis(), areaPlot.getValueAxisLabelFont(),
			areaPlot.getValueAxisLabelColor(), areaPlot.getValueAxisTickLabelFont(),
			areaPlot.getValueAxisTickLabelColor(), areaPlot.getValueAxisTickLabelMask(), areaPlot.getValueAxisVerticalTickLabels(),
			areaPlot.getOwnValueAxisLineColor(), true,
			(Comparable<?>)evaluateExpression(areaPlot.getRangeAxisMinValueExpression()),
			(Comparable<?>)evaluateExpression(areaPlot.getRangeAxisMaxValueExpression()));
			
	return jfreeChart;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:38,代码来源:GenericChartTheme.java

示例8: createBubbleChart

import org.jfree.chart.StandardChartTheme; //导入依赖的package包/类
protected JFreeChart createBubbleChart() throws JRException 
{
	ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
	JFreeChart jfreeChart = 
		ChartFactory.createBubbleChart(
			evaluateTextExpression(getChart().getTitleExpression()),
			evaluateTextExpression(((JRBubblePlot)getPlot()).getXAxisLabelExpression()),
			evaluateTextExpression(((JRBubblePlot)getPlot()).getYAxisLabelExpression()),
			 (XYZDataset)getDataset(),
			 getPlot().getOrientationValue().getOrientation(),
			 isShowLegend(),
			 true,
			 false);

	configureChart(jfreeChart, getPlot());

	XYPlot xyPlot = (XYPlot)jfreeChart.getPlot();
	JRBubblePlot bubblePlot = (JRBubblePlot)getPlot();
	int scaleType = bubblePlot.getScaleTypeValue() == null ? ScaleTypeEnum.ON_RANGE_AXIS.getValue() : bubblePlot.getScaleTypeValue().getValue();
	XYBubbleRenderer bubbleRenderer = new XYBubbleRenderer( scaleType );
	xyPlot.setRenderer( bubbleRenderer );

	// Handle the axis formating for the category axis
	configureAxis(xyPlot.getDomainAxis(), bubblePlot.getXAxisLabelFont(),
			bubblePlot.getXAxisLabelColor(), bubblePlot.getXAxisTickLabelFont(),
			bubblePlot.getXAxisTickLabelColor(), bubblePlot.getXAxisTickLabelMask(), bubblePlot.getXAxisVerticalTickLabels(),
			bubblePlot.getOwnXAxisLineColor(), false,
			(Comparable<?>)evaluateExpression(bubblePlot.getDomainAxisMinValueExpression()), 
			(Comparable<?>)evaluateExpression(bubblePlot.getDomainAxisMaxValueExpression()));

	// Handle the axis formating for the value axis
	configureAxis(xyPlot.getRangeAxis(), bubblePlot.getYAxisLabelFont(),
			bubblePlot.getYAxisLabelColor(), bubblePlot.getYAxisTickLabelFont(),
			bubblePlot.getYAxisTickLabelColor(), bubblePlot.getYAxisTickLabelMask(), bubblePlot.getYAxisVerticalTickLabels(),
			bubblePlot.getOwnYAxisLineColor(), true,
			(Comparable<?>)evaluateExpression(bubblePlot.getRangeAxisMinValueExpression()), 
			(Comparable<?>)evaluateExpression(bubblePlot.getRangeAxisMaxValueExpression()));

	return jfreeChart;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:41,代码来源:GenericChartTheme.java

示例9: createCandlestickChart

import org.jfree.chart.StandardChartTheme; //导入依赖的package包/类
/**
 *
 * @param evaluation
 * @throws net.sf.jasperreports.engine.JRException
 */
protected JFreeChart createCandlestickChart() throws JRException
{
	ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
	JFreeChart jfreeChart =
		ChartFactory.createCandlestickChart(
			evaluateTextExpression(getChart().getTitleExpression()),
			evaluateTextExpression(((JRCandlestickPlot)getPlot()).getTimeAxisLabelExpression()),
			evaluateTextExpression(((JRCandlestickPlot)getPlot()).getValueAxisLabelExpression()),
			(DefaultHighLowDataset)getDataset(),
			isShowLegend()
			);

	configureChart(jfreeChart, getPlot());

	XYPlot xyPlot = (XYPlot) jfreeChart.getPlot();
	JRCandlestickPlot candlestickPlot = (JRCandlestickPlot)getPlot();
	CandlestickRenderer candlestickRenderer = (CandlestickRenderer) xyPlot.getRenderer();
	boolean isShowVolume = candlestickPlot.getShowVolume() == null ? true : candlestickPlot.getShowVolume().booleanValue();
	candlestickRenderer.setDrawVolume(isShowVolume);

	// Handle the axis formating for the category axis
	configureAxis(xyPlot.getDomainAxis(), candlestickPlot.getTimeAxisLabelFont(),
			candlestickPlot.getTimeAxisLabelColor(), candlestickPlot.getTimeAxisTickLabelFont(),
			candlestickPlot.getTimeAxisTickLabelColor(), candlestickPlot.getTimeAxisTickLabelMask(), candlestickPlot.getTimeAxisVerticalTickLabels(),
			candlestickPlot.getOwnTimeAxisLineColor(), false,
			(Comparable<?>)evaluateExpression(candlestickPlot.getDomainAxisMinValueExpression()),
			(Comparable<?>)evaluateExpression(candlestickPlot.getDomainAxisMaxValueExpression()));

	// Handle the axis formating for the value axis
	configureAxis(xyPlot.getRangeAxis(), candlestickPlot.getValueAxisLabelFont(),
			candlestickPlot.getValueAxisLabelColor(), candlestickPlot.getValueAxisTickLabelFont(),
			candlestickPlot.getValueAxisTickLabelColor(), candlestickPlot.getValueAxisTickLabelMask(), candlestickPlot.getValueAxisVerticalTickLabels(),
			candlestickPlot.getOwnValueAxisLineColor(), true,
			(Comparable<?>)evaluateExpression(candlestickPlot.getRangeAxisMinValueExpression()),
			(Comparable<?>)evaluateExpression(candlestickPlot.getRangeAxisMaxValueExpression()));

	return jfreeChart;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:44,代码来源:GenericChartTheme.java

示例10: createStackedAreaChart

import org.jfree.chart.StandardChartTheme; //导入依赖的package包/类
/**
 *
 */
protected JFreeChart createStackedAreaChart() throws JRException
{
	ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
	JFreeChart jfreeChart =
		ChartFactory.createStackedAreaChart(
			evaluateTextExpression(getChart().getTitleExpression()),
			evaluateTextExpression(((JRAreaPlot)getPlot()).getCategoryAxisLabelExpression()),
			evaluateTextExpression(((JRAreaPlot)getPlot()).getValueAxisLabelExpression()),
			(CategoryDataset)getDataset(),
			getPlot().getOrientationValue().getOrientation(),
			isShowLegend(),
			true,
			false
			);

	configureChart(jfreeChart, getPlot());
	JRAreaPlot areaPlot = (JRAreaPlot)getPlot();

	// Handle the axis formating for the category axis
	configureAxis(((CategoryPlot)jfreeChart.getPlot()).getDomainAxis(), areaPlot.getCategoryAxisLabelFont(),
			areaPlot.getCategoryAxisLabelColor(), areaPlot.getCategoryAxisTickLabelFont(),
			areaPlot.getCategoryAxisTickLabelColor(), areaPlot.getCategoryAxisTickLabelMask(), areaPlot.getCategoryAxisVerticalTickLabels(),
			areaPlot.getOwnCategoryAxisLineColor(), false,
			(Comparable<?>)evaluateExpression(areaPlot.getDomainAxisMinValueExpression()),
			(Comparable<?>)evaluateExpression(areaPlot.getDomainAxisMaxValueExpression()));

	// Handle the axis formating for the value axis
	configureAxis(((CategoryPlot)jfreeChart.getPlot()).getRangeAxis(), areaPlot.getValueAxisLabelFont(),
			areaPlot.getValueAxisLabelColor(), areaPlot.getValueAxisTickLabelFont(),
			areaPlot.getValueAxisTickLabelColor(), areaPlot.getValueAxisTickLabelMask(), areaPlot.getValueAxisVerticalTickLabels(),
			areaPlot.getOwnValueAxisLineColor(), true,
			(Comparable<?>)evaluateExpression(areaPlot.getRangeAxisMinValueExpression()),
			(Comparable<?>)evaluateExpression(areaPlot.getRangeAxisMaxValueExpression()));

	((CategoryPlot)jfreeChart.getPlot()).getDomainAxis().setCategoryMargin(0);
	
	return jfreeChart;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:42,代码来源:GenericChartTheme.java

示例11: createXyAreaChart

import org.jfree.chart.StandardChartTheme; //导入依赖的package包/类
protected JFreeChart createXyAreaChart() throws JRException 
{
	ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
	JFreeChart jfreeChart = 
		ChartFactory.createXYAreaChart(
			evaluateTextExpression(getChart().getTitleExpression() ),
			evaluateTextExpression(((JRAreaPlot)getPlot()).getCategoryAxisLabelExpression()),
			evaluateTextExpression(((JRAreaPlot)getPlot()).getValueAxisLabelExpression()),
			(XYDataset)getDataset(),
			getPlot().getOrientationValue().getOrientation(),
			isShowLegend(),
			true,
			false
			);

	configureChart(jfreeChart, getPlot());
	JRAreaPlot areaPlot = (JRAreaPlot)getPlot();

	// Handle the axis formating for the category axis
	configureAxis(jfreeChart.getXYPlot().getDomainAxis(), areaPlot.getCategoryAxisLabelFont(),
			areaPlot.getCategoryAxisLabelColor(), areaPlot.getCategoryAxisTickLabelFont(),
			areaPlot.getCategoryAxisTickLabelColor(), areaPlot.getCategoryAxisTickLabelMask(), areaPlot.getCategoryAxisVerticalTickLabels(),
			areaPlot.getOwnCategoryAxisLineColor(), false,
			(Comparable<?>)evaluateExpression(areaPlot.getDomainAxisMinValueExpression()),
			(Comparable<?>)evaluateExpression(areaPlot.getDomainAxisMaxValueExpression()));

	// Handle the axis formating for the value axis
	configureAxis(jfreeChart.getXYPlot().getRangeAxis(), areaPlot.getValueAxisLabelFont(),
			areaPlot.getValueAxisLabelColor(), areaPlot.getValueAxisTickLabelFont(),
			areaPlot.getValueAxisTickLabelColor(), areaPlot.getValueAxisTickLabelMask(), areaPlot.getValueAxisVerticalTickLabels(),
			areaPlot.getOwnValueAxisLineColor(), true,
			(Comparable<?>)evaluateExpression(areaPlot.getRangeAxisMinValueExpression()),
			(Comparable<?>)evaluateExpression(areaPlot.getRangeAxisMaxValueExpression()));

	return jfreeChart;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:37,代码来源:GenericChartTheme.java

示例12: createAreaChart

import org.jfree.chart.StandardChartTheme; //导入依赖的package包/类
/**
 *
 */
protected JFreeChart createAreaChart() throws JRException 
{
	ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
	JFreeChart jfreeChart = 
		ChartFactory.createAreaChart( 
			evaluateTextExpression(getChart().getTitleExpression()),
			evaluateTextExpression(((JRAreaPlot)getPlot()).getCategoryAxisLabelExpression()),
			evaluateTextExpression(((JRAreaPlot)getPlot()).getValueAxisLabelExpression()),
			(CategoryDataset)getDataset(),
			getPlot().getOrientationValue().getOrientation(),
			isShowLegend(),
			true,
			false);

	configureChart(jfreeChart, getPlot());
	JRAreaPlot areaPlot = (JRAreaPlot)getPlot();
	// Handle the axis formating for the category axis
	configureAxis(((CategoryPlot)jfreeChart.getPlot()).getDomainAxis(), areaPlot.getCategoryAxisLabelFont(),
			areaPlot.getCategoryAxisLabelColor(), areaPlot.getCategoryAxisTickLabelFont(),
			areaPlot.getCategoryAxisTickLabelColor(), areaPlot.getCategoryAxisTickLabelMask(), areaPlot.getCategoryAxisVerticalTickLabels(),
			areaPlot.getOwnCategoryAxisLineColor(), getDomainAxisSettings(),
			(Comparable<?>)evaluateExpression(areaPlot.getDomainAxisMinValueExpression()), 
			(Comparable<?>)evaluateExpression(areaPlot.getDomainAxisMaxValueExpression())
			);
	// Handle the axis formating for the value axis
	configureAxis(((CategoryPlot)jfreeChart.getPlot()).getRangeAxis(), areaPlot.getValueAxisLabelFont(),
			areaPlot.getValueAxisLabelColor(), areaPlot.getValueAxisTickLabelFont(),
			areaPlot.getValueAxisTickLabelColor(), areaPlot.getValueAxisTickLabelMask(), areaPlot.getValueAxisVerticalTickLabels(),
			areaPlot.getOwnValueAxisLineColor(), getRangeAxisSettings(),
			(Comparable<?>)evaluateExpression(areaPlot.getRangeAxisMinValueExpression()), 
			(Comparable<?>)evaluateExpression(areaPlot.getRangeAxisMaxValueExpression())
	);
	return jfreeChart;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:38,代码来源:SimpleChartTheme.java

示例13: createStackedBarChart

import org.jfree.chart.StandardChartTheme; //导入依赖的package包/类
/**
 *
 */
protected JFreeChart createStackedBarChart() throws JRException
{
	ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
	JFreeChart jfreeChart =
		ChartFactory.createStackedBarChart(
			evaluateTextExpression(getChart().getTitleExpression()),
			evaluateTextExpression(((JRBarPlot)getPlot()).getCategoryAxisLabelExpression()),
			evaluateTextExpression(((JRBarPlot)getPlot()).getValueAxisLabelExpression()),
			(CategoryDataset)getDataset(),
			getPlot().getOrientationValue().getOrientation(),
			isShowLegend(),
			true,
			false
			);

	configureChart(jfreeChart, getPlot());

	CategoryPlot categoryPlot = (CategoryPlot)jfreeChart.getPlot();
	JRBarPlot barPlot = (JRBarPlot)getPlot();
	//plot.setNoDataMessage("No data to display");
	boolean isShowTickMarks = barPlot.getShowTickMarks() == null ? true : barPlot.getShowTickMarks().booleanValue();
	boolean isShowTickLabels = barPlot.getShowTickLabels() == null ? true : barPlot.getShowTickLabels().booleanValue();
	boolean isShowLabels = barPlot.getShowLabels() == null ? false : barPlot.getShowLabels().booleanValue();
	
	categoryPlot.getDomainAxis().setTickMarksVisible(isShowTickMarks);
	categoryPlot.getDomainAxis().setTickLabelsVisible(isShowTickLabels);
	((NumberAxis)categoryPlot.getRangeAxis()).setTickMarksVisible(isShowTickMarks);
	((NumberAxis)categoryPlot.getRangeAxis()).setTickLabelsVisible(isShowTickLabels);

	BarRenderer categoryRenderer = (BarRenderer)categoryPlot.getRenderer();
	categoryRenderer.setBaseItemLabelGenerator((CategoryItemLabelGenerator)getLabelGenerator());
	categoryRenderer.setBaseItemLabelsVisible(isShowLabels);
	categoryRenderer.setShadowVisible(false);

	// Handle the axis formating for the category axis
	configureAxis(categoryPlot.getDomainAxis(), barPlot.getCategoryAxisLabelFont(),
			barPlot.getCategoryAxisLabelColor(), barPlot.getCategoryAxisTickLabelFont(),
			barPlot.getCategoryAxisTickLabelColor(), barPlot.getCategoryAxisTickLabelMask(), barPlot.getCategoryAxisVerticalTickLabels(),
			barPlot.getOwnCategoryAxisLineColor(), getDomainAxisSettings(),
			(Comparable<?>)evaluateExpression(barPlot.getDomainAxisMinValueExpression()), 
			(Comparable<?>)evaluateExpression(barPlot.getDomainAxisMaxValueExpression())
			);

	// Handle the axis formating for the value axis
	configureAxis(categoryPlot.getRangeAxis(), barPlot.getValueAxisLabelFont(),
			barPlot.getValueAxisLabelColor(), barPlot.getValueAxisTickLabelFont(),
			barPlot.getValueAxisTickLabelColor(), barPlot.getValueAxisTickLabelMask(), barPlot.getValueAxisVerticalTickLabels(),
			barPlot.getOwnValueAxisLineColor(), getRangeAxisSettings(),
			(Comparable<?>)evaluateExpression(barPlot.getRangeAxisMinValueExpression()), 
			(Comparable<?>)evaluateExpression(barPlot.getRangeAxisMaxValueExpression())
			);

	return jfreeChart;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:58,代码来源:SimpleChartTheme.java

示例14: createXyAreaChart

import org.jfree.chart.StandardChartTheme; //导入依赖的package包/类
protected JFreeChart createXyAreaChart() throws JRException 
{
	ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
	JFreeChart jfreeChart = 
		ChartFactory.createXYAreaChart(
			evaluateTextExpression(getChart().getTitleExpression() ),
			evaluateTextExpression(((JRAreaPlot)getPlot()).getCategoryAxisLabelExpression()),
			evaluateTextExpression(((JRAreaPlot)getPlot()).getValueAxisLabelExpression()),
			(XYDataset)getDataset(),
			getPlot().getOrientationValue().getOrientation(),
			isShowLegend(),
			true,
			false
			);

	configureChart(jfreeChart, getPlot());
	JRAreaPlot areaPlot = (JRAreaPlot)getPlot();

	// Handle the axis formating for the category axis
	configureAxis(jfreeChart.getXYPlot().getDomainAxis(), areaPlot.getCategoryAxisLabelFont(),
			areaPlot.getCategoryAxisLabelColor(), areaPlot.getCategoryAxisTickLabelFont(),
			areaPlot.getCategoryAxisTickLabelColor(), areaPlot.getCategoryAxisTickLabelMask(), areaPlot.getCategoryAxisVerticalTickLabels(),
			areaPlot.getOwnCategoryAxisLineColor(), getDomainAxisSettings(),
			(Comparable<?>)evaluateExpression(areaPlot.getDomainAxisMinValueExpression()), 
			(Comparable<?>)evaluateExpression(areaPlot.getDomainAxisMaxValueExpression())
			);

	// Handle the axis formating for the value axis
	configureAxis(jfreeChart.getXYPlot().getRangeAxis(), areaPlot.getValueAxisLabelFont(),
			areaPlot.getValueAxisLabelColor(), areaPlot.getValueAxisTickLabelFont(),
			areaPlot.getValueAxisTickLabelColor(), areaPlot.getValueAxisTickLabelMask(), areaPlot.getValueAxisVerticalTickLabels(),
			areaPlot.getOwnValueAxisLineColor(), getRangeAxisSettings(),
			(Comparable<?>)evaluateExpression(areaPlot.getRangeAxisMinValueExpression()), 
			(Comparable<?>)evaluateExpression(areaPlot.getRangeAxisMaxValueExpression())
			);

	return jfreeChart;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:39,代码来源:SimpleChartTheme.java

示例15: createAreaChart

import org.jfree.chart.StandardChartTheme; //导入依赖的package包/类
/**
 *
 */
protected JFreeChart createAreaChart() throws JRException 
{
	ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
	JFreeChart jfreeChart = 
		ChartFactory.createAreaChart( 
			evaluateTextExpression(getChart().getTitleExpression()),
			evaluateTextExpression(((JRAreaPlot)getPlot()).getCategoryAxisLabelExpression()),
			evaluateTextExpression(((JRAreaPlot)getPlot()).getValueAxisLabelExpression()),
			(CategoryDataset)getDataset(),
			getPlot().getOrientationValue().getOrientation(),
			isShowLegend(),
			true,
			false);

	configureChart(jfreeChart);
	JRAreaPlot areaPlot = (JRAreaPlot)getPlot();
	// Handle the axis formating for the category axis
	configureAxis(((CategoryPlot)jfreeChart.getPlot()).getDomainAxis(), areaPlot.getCategoryAxisLabelFont(),
			areaPlot.getCategoryAxisLabelColor(), areaPlot.getCategoryAxisTickLabelFont(),
			areaPlot.getCategoryAxisTickLabelColor(), areaPlot.getCategoryAxisTickLabelMask(), areaPlot.getCategoryAxisVerticalTickLabels(),
			areaPlot.getCategoryAxisLineColor(), false,
			(Comparable<?>)evaluateExpression(areaPlot.getDomainAxisMinValueExpression()),
			(Comparable<?>)evaluateExpression(areaPlot.getDomainAxisMaxValueExpression()));
	
	// Handle the axis formating for the value axis
	configureAxis(((CategoryPlot)jfreeChart.getPlot()).getRangeAxis(), areaPlot.getValueAxisLabelFont(),
			areaPlot.getValueAxisLabelColor(), areaPlot.getValueAxisTickLabelFont(),
			areaPlot.getValueAxisTickLabelColor(), areaPlot.getValueAxisTickLabelMask(), areaPlot.getValueAxisVerticalTickLabels(),
			areaPlot.getValueAxisLineColor(), true,
			(Comparable<?>)evaluateExpression(areaPlot.getRangeAxisMinValueExpression()),
			(Comparable<?>)evaluateExpression(areaPlot.getRangeAxisMaxValueExpression()));
	return jfreeChart;
}
 
开发者ID:TIBCOSoftware,项目名称:jasperreports,代码行数:37,代码来源:DefaultChartTheme.java


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