コード例 #1
0
 private static void configureXYAreaRenderer2(
     ValueSourceData valueSourceData, XYAreaRenderer2 renderer) {
   int seriesCount = valueSourceData.getSeriesCount();
   SeriesFormat seriesFormat = valueSourceData.getValueSource().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) {
     renderer.setSeriesPaint(seriesIdx, seriesFormat.getAreaFillPaint());
   }
   // don't use outline paint, otherwise the plot shows vertical lines
   renderer.setOutline(false);
 }
コード例 #2
0
  private static void assertMaxValueCountNotExceededOrThrowException(
      ValueSourceData valueSourceData) throws ChartPlottimeException {
    if (valueSourceData == null) {
      return;
    }
    int maxAllowedValueCount = PlotConfiguration.getMaxAllowedValueCount();

    for (GroupCellKeyAndData groupCellKeyAndData :
        valueSourceData.getSeriesDataForAllGroupCells()) {
      int size = groupCellKeyAndData.getData().getSize();
      if (size > maxAllowedValueCount) {
        throw new ChartPlottimeException(
            "too_many_values_in_plot", valueSourceData.getValueSource().toString());
      }
    }
  }