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


Java StandardChartTheme.setRangeGridlinePaint方法代码示例

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


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

示例1: 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

示例2: 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

示例3: notSoUglyPlease

import org.jfree.chart.StandardChartTheme; //导入方法依赖的package包/类
private static void notSoUglyPlease(JFreeChart chart) {
	String fontName = "Lucida Sans";

	StandardChartTheme theme = (StandardChartTheme)org.jfree.chart.StandardChartTheme.createJFreeTheme();

	theme.setTitlePaint( Color.decode("#4572a7") );
	theme.setExtraLargeFont(new Font(fontName, Font.BOLD, 14)); //title
	theme.setLargeFont(new Font(fontName, Font.BOLD, 15)); //axis-title
	theme.setRegularFont(new Font(fontName, Font.PLAIN, 11));
	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"));
	theme.apply(chart);
	chart.getCategoryPlot().setOutlineVisible(false);
	chart.getCategoryPlot().getRangeAxis().setAxisLineVisible(false);
	chart.getCategoryPlot().getRangeAxis().setTickMarksVisible(false);
	chart.getCategoryPlot().setRangeGridlineStroke(new BasicStroke());
	chart.getCategoryPlot().getRangeAxis().setTickLabelPaint(Color.decode("#666666"));
	chart.getCategoryPlot().getDomainAxis().setTickLabelPaint(Color.decode("#666666"));
	chart.setTextAntiAlias(true);
	chart.setAntiAlias(true);
	BarRenderer rend = (BarRenderer) chart.getCategoryPlot().getRenderer();
	rend.setShadowVisible(true);
	rend.setShadowXOffset(2);
	rend.setShadowYOffset(0);
	rend.setShadowPaint(Color.decode("#C0C0C0"));
	rend.setMaximumBarWidth(0.1);
}
 
开发者ID:junkdog,项目名称:entity-system-benchmarks,代码行数:33,代码来源:ChartWriterFactory.java

示例4: changeFontSize

import org.jfree.chart.StandardChartTheme; //导入方法依赖的package包/类
/**
 * convenience method to make the value marker labels larger or smaller
 * 
 * @param up
 */
private void changeFontSize(final Boolean up)
{
  // are we making a change?
  final float change;
  if (up != null)
  {
    // sort out which direction we're changing
    if (up)
    {
      change = MARKER_STEP_SIZE;
    }
    else
    {
      change = -MARKER_STEP_SIZE;
    }

  }
  else
  {
    change = 0;
  }

  // do we have a default?
  final float curSize =
      Activator.getDefault().getPreferenceStore().getFloat(
          TimeBarPlot.CHART_FONT_SIZE_NODE);

  // trim to reasonable size
  final float sizeToUse = Math.max(9, curSize);

  // produce new size
  final float newVal = sizeToUse + change;

  // store the new size
  Activator.getDefault().getPreferenceStore().setValue(
      TimeBarPlot.CHART_FONT_SIZE_NODE, newVal);

  final float base = newVal;

  final StandardChartTheme theme =
      (StandardChartTheme) StandardChartTheme.createJFreeTheme();

  theme.setRegularFont(theme.getRegularFont().deriveFont(base * 1.0f));
  theme.setExtraLargeFont(theme.getExtraLargeFont().deriveFont(base * 1.4f));
  theme.setLargeFont(theme.getLargeFont().deriveFont(base * 1.2f));
  theme.setSmallFont(theme.getSmallFont().deriveFont(base * 0.8f));
  theme.setChartBackgroundPaint(Color.white);
  theme.setPlotBackgroundPaint(Color.white);
  theme.setGridBandPaint(Color.lightGray);
  theme.setDomainGridlinePaint(Color.lightGray);
  theme.setRangeGridlinePaint(Color.lightGray);

  theme.apply(jFreeChart);
}
 
开发者ID:debrief,项目名称:limpet,代码行数:60,代码来源:StackedChartsView.java


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