public virtual void add(XYPlot subplot, int weight)
 {
   if (weight <= 0)
   {
     string str = "The 'weight' must be positive.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     subplot.setParent((Plot) this);
     subplot.setWeight(weight);
     subplot.setInsets(new RectangleInsets(0.0, 0.0, 0.0, 0.0));
     subplot.setRangeAxis((ValueAxis) null);
     subplot.addChangeListener((PlotChangeListener) this);
     this.subplots.add((object) subplot);
     this.configureRangeAxes();
     this.fireChangeEvent();
   }
 }
Example #2
0
 public static JFreeChart createStackedXYAreaChart(string title, string xAxisLabel, string yAxisLabel, TableXYDataset dataset, PlotOrientation orientation, bool legend, bool tooltips, bool urls)
 {
   int num1 = tooltips ? 1 : 0;
   int num2 = urls ? 1 : 0;
   int num3 = legend ? 1 : 0;
   if (orientation == null)
   {
     string str = "Null 'orientation' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     NumberAxis numberAxis1 = new NumberAxis(xAxisLabel);
     numberAxis1.setAutoRangeIncludesZero(false);
     numberAxis1.setLowerMargin(0.0);
     numberAxis1.setUpperMargin(0.0);
     NumberAxis numberAxis2 = new NumberAxis(yAxisLabel);
     StandardXYToolTipGenerator toolTipGenerator = (StandardXYToolTipGenerator) null;
     if (num1 != 0)
       toolTipGenerator = new StandardXYToolTipGenerator();
     StandardXYURLGenerator standardXyurlGenerator = (StandardXYURLGenerator) null;
     if (num2 != 0)
       standardXyurlGenerator = new StandardXYURLGenerator();
     StackedXYAreaRenderer2 stackedXyAreaRenderer2 = new StackedXYAreaRenderer2((XYToolTipGenerator) toolTipGenerator, (XYURLGenerator) standardXyurlGenerator);
     stackedXyAreaRenderer2.setOutline(true);
     XYPlot xyPlot = new XYPlot((XYDataset) dataset, (ValueAxis) numberAxis1, (ValueAxis) numberAxis2, (XYItemRenderer) stackedXyAreaRenderer2);
     xyPlot.setOrientation(orientation);
     xyPlot.setRangeAxis((ValueAxis) numberAxis2);
     JFreeChart.__\u003Cclinit\u003E();
     JFreeChart jfc = new JFreeChart(title, JFreeChart.__\u003C\u003EDEFAULT_TITLE_FONT, (Plot) xyPlot, num3 != 0);
     ChartFactory.currentTheme.apply(jfc);
     return jfc;
   }
 }