gpt4 book ai didi

org.jfree.chart.renderer.xy.XYStepRenderer类的使用及代码示例

转载 作者:知者 更新时间:2024-03-25 23:21:05 30 4
gpt4 key购买 nike

本文整理了Java中org.jfree.chart.renderer.xy.XYStepRenderer类的一些代码示例,展示了XYStepRenderer类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XYStepRenderer类的具体详情如下:
包路径:org.jfree.chart.renderer.xy.XYStepRenderer
类名称:XYStepRenderer

XYStepRenderer介绍

[英]Line/Step item renderer for an XYPlot. This class draws lines between data points, only allowing horizontal or vertical lines (steps). The example shown here is generated by the XYStepRendererDemo1.java program included in the JFreeChart demo collection:
[中]XYPlot的行/步项目渲染器。此类在数据点之间绘制线,只允许水平线或垂直线(步)。这里显示的示例是由XYStepRenderDemo1生成的。JFreeChart演示集合中包含的java程序:

代码示例

代码示例来源:origin: kiegroup/optaplanner

XYPlot plot = createPlot(benchmarkReport, scoreLevelIndex);
XYItemRenderer renderer = new XYStepRenderer();
plot.setRenderer(renderer);
XYSeriesCollection seriesCollection = new XYSeriesCollection();
for (XYSeries series : constraintIdToWeightSeriesMapList.get(scoreLevelIndex).values()) {
  seriesCollection.addSeries(series);
plot.setDataset(seriesCollection);
String scoreLevelLabel = subSingleBenchmarkResult.getSingleBenchmarkResult().getProblemBenchmarkResult()
    .findScoreLevelLabel(scoreLevelIndex);

代码示例来源:origin: infiniteautomation/ma-core-public

((DateAxis) plot.getDomainAxis()).setTimeZone(pointTimeSeriesCollection.getTimeZone());
plot.setBackgroundPaint(SystemSettingsDao.instance.getColour(SystemSettingsDao.PLOT_BACKGROUND_COLOUR));
Color gridlines = SystemSettingsDao.instance.getColour(SystemSettingsDao.PLOT_GRIDLINE_COLOUR);
plot.setDomainGridlinePaint(gridlines);
plot.setRangeGridlinePaint(gridlines);
((NumberAxis) plot.getRangeAxis()).setAutoRangeStickyZero(false);
    AbstractXYItemRenderer renderer;
    if (nts.getPlotType() == DataPointVO.PlotTypes.STEP)
      renderer = new XYStepRenderer();
    else if (nts.getPlotType() == DataPointVO.PlotTypes.LINE)
      renderer = new XYLineAndShapeRenderer(true, false);
  for (int i = 0; i < pointTimeSeriesCollection.getDiscreteSeriesCount(); i++) {
    DiscreteTimeSeries dts = pointTimeSeriesCollection.getDiscreteTimeSeries(i);
    XYStepRenderer renderer = new XYStepRenderer();
      renderer.setSeriesPaint(0, dts.getPaint(), false);
    if (dts.getStroke() != null)
      renderer.setSeriesStroke(0, dts.getStroke(), false);
    plot.setDataset(numericSeriesCount + i,

代码示例来源:origin: org.codehaus.jtstand/jtstand-chart

urlGenerator = new StandardXYURLGenerator();
XYItemRenderer renderer = new XYStepRenderer(toolTipGenerator,
    urlGenerator);
XYPlot plot = new XYPlot(dataset, xAxis, yAxis, null);
plot.setRenderer(renderer);
plot.setOrientation(orientation);
plot.setDomainCrosshairVisible(false);
plot.setRangeCrosshairVisible(false);

代码示例来源:origin: dynamicreports/dynamicreports

/**
   * {@inheritDoc}
   */
  @Override
  public void customize(JFreeChart chart, ReportParameters reportParameters) {
    XYLineAndShapeRenderer lineRenderer = (XYLineAndShapeRenderer) chart.getXYPlot().getRenderer();
    XYStepRenderer renderer = new XYStepRenderer();

    renderer.setBaseItemLabelsVisible(lineRenderer.getBaseItemLabelsVisible());
    renderer.setBaseItemLabelFont(lineRenderer.getBaseItemLabelFont());
    renderer.setBaseItemLabelPaint(lineRenderer.getBaseItemLabelPaint());
    renderer.setBaseItemLabelGenerator(lineRenderer.getBaseItemLabelGenerator());
    renderer.setBaseShapesVisible(lineRenderer.getBaseShapesVisible());
    renderer.setBaseLinesVisible(lineRenderer.getBaseLinesVisible());

    if (stepPoint != null) {
      renderer.setStepPoint(stepPoint);
    }
    chart.getXYPlot().setRenderer(renderer);
  }
}

代码示例来源:origin: stackoverflow.com

);
XYPlot plot = (XYPlot) chart.getPlot();
plot.setDomainPannable(true);
plot.setRangePannable(true);
  XYStepRenderer renderer = new XYStepRenderer();
  renderer.setBaseShapesVisible(true);
  renderer.setSeriesStroke(0, new BasicStroke(2.0f));
  renderer.setSeriesStroke(1, new BasicStroke(2.0f));
  renderer.setBaseToolTipGenerator(new StandardXYToolTipGenerator());
  renderer.setDefaultEntityRadius(6);
  plot.setRenderer(renderer);

代码示例来源:origin: com.atlassian.confluence.extra.chart/chart-plugin

/**
 * Utility method to set the default style of the XY Step Charts
 *
 * @param chart {@link JFreeChart} to style
 */
private static void setXYStepChartDefaults(JFreeChart chart)
{
  ChartUtil.setDefaults(chart);
  XYPlot plot = (XYPlot) chart.getPlot();
  plot.setDomainGridlinesVisible(false);
  // renderer
  XYStepRenderer renderer = (XYStepRenderer) plot.getRenderer();
  renderer.setBaseItemLabelFont(ChartDefaults.defaultFont);
  renderer.setBaseStroke(ChartDefaults.defaultStroke);
  renderer.setShapesVisible(false);
  for (int j = 0; j < ChartDefaults.darkColors.length; j++)
  {
    renderer.setSeriesStroke(j, ChartDefaults.defaultStroke);
    renderer.setSeriesPaint(j, ChartDefaults.darkColors[j]);
  }
}

代码示例来源:origin: jfree/jfreechart

if (!getItemVisible(series, item)) {
  return;
Paint seriesPaint = getItemPaint(series, item);
Stroke seriesStroke = getItemStroke(series, item);
g2.setPaint(seriesPaint);
g2.setStroke(seriesStroke);
      drawLine(g2, state.workingLine, transY0, transX0, transY1,
          transX1, dataArea);
      double transXs = transX0 + (getStepPoint()
      drawLine(g2, state.workingLine, transY0, transX0, transY0,
          transXs, dataArea);
      drawLine(g2, state.workingLine, transY0, transXs, transY1,
          transXs, dataArea);
      drawLine(g2, state.workingLine, transY1, transXs, transY1,
          transX1, dataArea);
      drawLine(g2, state.workingLine, transX0, transY0, transX1,
          transY1, dataArea);
      double transXs = transX0 + (getStepPoint()
      drawLine(g2, state.workingLine, transX0, transY0, transXs,
          transY0, dataArea);
      drawLine(g2, state.workingLine, transXs, transY0, transXs,
          transY1, dataArea);

代码示例来源:origin: pentaho/pentaho-platform

break;
 case STEP_CHART_TYPE:
  renderer = new XYStepRenderer();
  break;
 case STEP_AREA_CHART_TYPE:
  .getLineWidth() ) );
XYPlot plot = new XYPlot( chartDefinition, domainAxis, rangeAxis, renderer );
JFreeChartEngine.updatePlot( plot, chartDefinition );

代码示例来源:origin: stackoverflow.com

XYStepRenderer renderer = new XYStepRenderer();
renderer.setBaseShapesVisible(true);
renderer.setSeriesStroke(0, new BasicStroke(2.0f));
renderer.setSeriesStroke(1, new BasicStroke(2.0f));
renderer.setBaseToolTipGenerator(new StandardXYToolTipGenerator());
renderer.setDefaultEntityRadius(6);
plot.setRenderer(renderer);

代码示例来源:origin: org.codehaus.jtstand/jtstand-chart

/**
 * Constructs a new renderer with the specified tool tip and URL
 * generators.
 *
 * @param toolTipGenerator  the item label generator (<code>null</code>
 *     permitted).
 * @param urlGenerator  the URL generator (<code>null</code> permitted).
 */
public XYStepRenderer(XYToolTipGenerator toolTipGenerator,
           XYURLGenerator urlGenerator) {
  super();
  setBaseToolTipGenerator(toolTipGenerator);
  setURLGenerator(urlGenerator);
  setBaseShapesVisible(false);
}

代码示例来源:origin: jfree/jfreechart

/**
 * Sets the step point and sends a {@link RendererChangeEvent} to all
 * registered listeners.
 *
 * @param stepPoint  the step point (in the range 0.0 to 1.0)
 *
 * @see #getStepPoint()
 *
 * @since 1.0.10
 */
public void setStepPoint(double stepPoint) {
  if (stepPoint < 0.0d || stepPoint > 1.0d) {
    throw new IllegalArgumentException(
        "Requires stepPoint in [0.0;1.0]");
  }
  this.stepPoint = stepPoint;
  fireChangeEvent();
}

代码示例来源:origin: jfree/jfreechart

urlGenerator = new StandardXYURLGenerator();
XYItemRenderer renderer = new XYStepRenderer(toolTipGenerator,
    urlGenerator);
XYPlot plot = new XYPlot(dataset, xAxis, yAxis, null);
plot.setRenderer(renderer);
plot.setOrientation(orientation);
plot.setDomainCrosshairVisible(false);
plot.setRangeCrosshairVisible(false);

代码示例来源:origin: org.codehaus.jtstand/jtstand-chart

if (!getItemVisible(series, item)) {
  return;
Paint seriesPaint = getItemPaint(series, item);
Stroke seriesStroke = getItemStroke(series, item);
g2.setPaint(seriesPaint);
g2.setStroke(seriesStroke);
      drawLine(g2, state.workingLine, transY0, transX0, transY1,
          transX1);
      double transXs = transX0 + (getStepPoint()
      drawLine(g2, state.workingLine, transY0, transX0, transY0,
          transXs);
      drawLine(g2, state.workingLine, transY0, transXs, transY1,
          transXs);
      drawLine(g2, state.workingLine, transY1, transXs, transY1,
          transX1);
      drawLine(g2, state.workingLine, transX0, transY0, transX1,
          transY1);
      double transXs = transX0 + (getStepPoint()
      drawLine(g2, state.workingLine, transX0, transY0, transXs,
          transY0);
      drawLine(g2, state.workingLine, transXs, transY0, transXs,
          transY1);

代码示例来源:origin: pentaho/pentaho-platform

break;
 case STEP_CHART_TYPE:
  renderer = new XYStepRenderer();
  break;
 case STEP_AREA_CHART_TYPE:
  .getLineWidth() ) );
XYPlot plot = new XYPlot( chartDefinition, domainAxis, rangeAxis, renderer );
JFreeChartEngine.updatePlot( plot, chartDefinition );

代码示例来源:origin: org.codehaus.jtstand/jtstand-chart

/**
 * Sets the step point and sends a {@link RendererChangeEvent} to all
 * registered listeners.
 *
 * @param stepPoint  the step point (in the range 0.0 to 1.0)
 *
 * @see #getStepPoint()
 *
 * @since 1.0.10
 */
public void setStepPoint(double stepPoint) {
  if (stepPoint < 0.0d || stepPoint > 1.0d) {
    throw new IllegalArgumentException(
        "Requires stepPoint in [0.0;1.0]");
  }
  this.stepPoint = stepPoint;
  fireChangeEvent();
}

代码示例来源:origin: kiegroup/optaplanner

XYPlot plot = createPlot(benchmarkReport, scoreLevelIndex);
XYItemRenderer renderer = new XYStepRenderer();
plot.setRenderer(renderer);
XYSeriesCollection seriesCollection = new XYSeriesCollection();
for (XYSeries series : constraintIdToWeightSeriesMapList.get(scoreLevelIndex).values()) {
  seriesCollection.addSeries(series);
plot.setDataset(seriesCollection);
String scoreLevelLabel = subSingleBenchmarkResult.getSingleBenchmarkResult().getProblemBenchmarkResult()
    .findScoreLevelLabel(scoreLevelIndex);

代码示例来源:origin: kiegroup/optaplanner

List<XYSeries> seriesList = new ArrayList<>(BenchmarkReport.CHARTED_SCORE_LEVEL_SIZE);
XYItemRenderer renderer = new XYStepRenderer();
if (singleBenchmarkResult.hasAllSuccess()) {
  StepScoreSubSingleStatistic subSingleStatistic = (StepScoreSubSingleStatistic)
    plotList.add(createPlot(benchmarkReport, i));
  plotList.get(i).setDataset(seriesIndex, new XYSeriesCollection(seriesList.get(i)));
  plotList.get(i).setRenderer(seriesIndex, renderer);

代码示例来源:origin: kiegroup/optaplanner

List<XYSeries> seriesList = new ArrayList<>(BenchmarkReport.CHARTED_SCORE_LEVEL_SIZE);
XYItemRenderer renderer = new XYStepRenderer();
if (singleBenchmarkResult.hasAllSuccess()) {
  BestScoreSubSingleStatistic subSingleStatistic = (BestScoreSubSingleStatistic)
    plotList.add(createPlot(benchmarkReport, i));
  plotList.get(i).setDataset(seriesIndex, new XYSeriesCollection(seriesList.get(i)));
  plotList.get(i).setRenderer(seriesIndex, renderer);

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com