public virtual void add(CategoryPlot subplot, int weight)
 {
   if (subplot == null)
   {
     string str = "Null 'subplot' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else if (weight < 1)
   {
     string str = "Require weight >= 1.";
     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.setDomainAxis((CategoryAxis) null);
     subplot.setOrientation(this.getOrientation());
     subplot.addChangeListener((PlotChangeListener) this);
     this.subplots.add((object) subplot);
     CategoryAxis domainAxis = this.getDomainAxis();
     if (domainAxis != null)
       domainAxis.configure();
     this.fireChangeEvent();
   }
 }
 public override void drawItem(Graphics2D g2, CategoryItemRendererState state, Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset dataset, int row, int column, int pass)
 {
   Number number1 = dataset.getValue(row, column);
   if (number1 == null)
     return;
   double categoryMiddle1 = domainAxis.getCategoryMiddle(column, this.getColumnCount(), dataArea, plot.getDomainAxisEdge());
   double num1 = rangeAxis.valueToJava2D(number1.doubleValue(), dataArea, plot.getRangeAxisEdge());
   g2.setPaint(this.getItemPaint(row, column));
   g2.setStroke(this.getItemStroke(row, column));
   Rectangle2D.Double double1 = new Rectangle2D.Double(categoryMiddle1 - 4.0, num1 - 4.0, 8.0, 8.0);
   PlotOrientation orientation = plot.getOrientation();
   if (orientation == PlotOrientation.__\u003C\u003EVERTICAL)
     this.objectIcon.paintIcon((Component) null, (Graphics) g2, ByteCodeHelper.d2i(categoryMiddle1), ByteCodeHelper.d2i(num1));
   else
     this.objectIcon.paintIcon((Component) null, (Graphics) g2, ByteCodeHelper.d2i(num1), ByteCodeHelper.d2i(categoryMiddle1));
   if (this.lastCategory == column)
   {
     if (this.min > number1.doubleValue())
       this.min = number1.doubleValue();
     if (this.max < number1.doubleValue())
       this.max = number1.doubleValue();
     if (dataset.getRowCount() - 1 == row)
     {
       g2.setPaint(this.groupPaint);
       g2.setStroke(this.groupStroke);
       double num2 = rangeAxis.valueToJava2D(this.min, dataArea, plot.getRangeAxisEdge());
       double num3 = rangeAxis.valueToJava2D(this.max, dataArea, plot.getRangeAxisEdge());
       if (orientation == PlotOrientation.__\u003C\u003EVERTICAL)
       {
         g2.draw((Shape) new Line2D.Double(categoryMiddle1, num2, categoryMiddle1, num3));
         this.minIcon.paintIcon((Component) null, (Graphics) g2, ByteCodeHelper.d2i(categoryMiddle1), ByteCodeHelper.d2i(num2));
         this.maxIcon.paintIcon((Component) null, (Graphics) g2, ByteCodeHelper.d2i(categoryMiddle1), ByteCodeHelper.d2i(num3));
       }
       else
       {
         g2.draw((Shape) new Line2D.Double(num2, categoryMiddle1, num3, categoryMiddle1));
         this.minIcon.paintIcon((Component) null, (Graphics) g2, ByteCodeHelper.d2i(num2), ByteCodeHelper.d2i(categoryMiddle1));
         this.maxIcon.paintIcon((Component) null, (Graphics) g2, ByteCodeHelper.d2i(num3), ByteCodeHelper.d2i(categoryMiddle1));
       }
     }
   }
   else
   {
     this.lastCategory = column;
     this.min = number1.doubleValue();
     this.max = number1.doubleValue();
   }
   if (this.plotLines && column != 0)
   {
     Number number2 = dataset.getValue(row, column - 1);
     if (number2 != null)
     {
       double d = number2.doubleValue();
       double categoryMiddle2 = domainAxis.getCategoryMiddle(column - 1, this.getColumnCount(), dataArea, plot.getDomainAxisEdge());
       double num2 = rangeAxis.valueToJava2D(d, dataArea, plot.getRangeAxisEdge());
       g2.setPaint(this.getItemPaint(row, column));
       g2.setStroke(this.getItemStroke(row, column));
       Line2D.Double double2 = orientation != PlotOrientation.__\u003C\u003EVERTICAL ? new Line2D.Double(num2, categoryMiddle2, num1, categoryMiddle1) : new Line2D.Double(categoryMiddle2, num2, categoryMiddle1, num1);
       g2.draw((Shape) double2);
     }
   }
   EntityCollection entityCollection = state.getEntityCollection();
   if (entityCollection == null || double1 == null)
     return;
   this.addItemEntity(entityCollection, dataset, row, column, (Shape) double1);
 }
 protected internal virtual void drawInterval(Graphics2D g2, CategoryItemRendererState state, Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, IntervalCategoryDataset dataset, int row, int column)
 {
   int visibleSeriesIndex = state.getVisibleSeriesIndex(row);
   if (visibleSeriesIndex < 0)
     return;
   int num1 = state.getVisibleSeriesCount() < 0 ? this.getRowCount() : state.getVisibleSeriesCount();
   int columnCount = this.getColumnCount();
   PlotOrientation orientation = plot.getOrientation();
   double num2 = 0.0;
   double num3 = 0.0;
   RectangleEdge domainAxisEdge = plot.getDomainAxisEdge();
   RectangleEdge rangeAxisEdge = plot.getRangeAxisEdge();
   Number endValue = dataset.getEndValue(row, column);
   if (endValue == null)
     return;
   double num4 = rangeAxis.valueToJava2D(endValue.doubleValue(), dataArea, rangeAxisEdge);
   Number startValue = dataset.getStartValue(row, column);
   if (startValue == null)
     return;
   double num5 = rangeAxis.valueToJava2D(startValue.doubleValue(), dataArea, rangeAxisEdge);
   if (num5 < num4)
   {
     double num6 = num5;
     num5 = num4;
     num4 = num6;
   }
   double num7 = state.getBarWidth();
   double num8 = Math.abs(num5 - num4);
   RectangleEdge re = RectangleEdge.__\u003C\u003ELEFT;
   if (orientation == PlotOrientation.__\u003C\u003EHORIZONTAL)
   {
     double categoryStart = domainAxis.getCategoryStart(column, this.getColumnCount(), dataArea, domainAxisEdge);
     if (num1 > 1)
     {
       double num6 = ((RectangularShape) dataArea).getHeight() * this.getItemMargin() / (double) (columnCount * (num1 - 1));
       num3 = categoryStart + (double) visibleSeriesIndex * (state.getBarWidth() + num6);
     }
     else
       num3 = categoryStart + (double) visibleSeriesIndex * state.getBarWidth();
     num2 = num4;
     num8 = state.getBarWidth();
     num7 = Math.abs(num5 - num4);
     re = RectangleEdge.__\u003C\u003ELEFT;
   }
   else if (orientation == PlotOrientation.__\u003C\u003EVERTICAL)
   {
     double categoryStart = domainAxis.getCategoryStart(column, this.getColumnCount(), dataArea, domainAxisEdge);
     if (num1 > 1)
     {
       double num6 = ((RectangularShape) dataArea).getWidth() * this.getItemMargin() / (double) (columnCount * (num1 - 1));
       num2 = categoryStart + (double) visibleSeriesIndex * (state.getBarWidth() + num6);
     }
     else
       num2 = categoryStart + (double) visibleSeriesIndex * state.getBarWidth();
     num3 = num4;
     re = RectangleEdge.__\u003C\u003EBOTTOM;
   }
   Rectangle2D.Double @double = new Rectangle2D.Double(num2, num3, num7, num8);
   BarPainter barPainter = this.getBarPainter();
   if (this.getShadowsVisible())
     barPainter.paintBarShadow(g2, (BarRenderer) this, row, column, (RectangularShape) @double, re, false);
   this.getBarPainter().paintBar(g2, (BarRenderer) this, row, column, (RectangularShape) @double, re);
   CategoryItemLabelGenerator itemLabelGenerator = this.getItemLabelGenerator(row, column);
   if (itemLabelGenerator != null && this.isItemLabelVisible(row, column))
     this.drawItemLabel(g2, (CategoryDataset) dataset, row, column, plot, itemLabelGenerator, (Rectangle2D) @double, false);
   EntityCollection entityCollection = state.getEntityCollection();
   if (entityCollection == null)
     return;
   this.addItemEntity(entityCollection, (CategoryDataset) dataset, row, column, (Shape) @double);
 }
 public override void drawItem(Graphics2D g2, CategoryItemRendererState state, Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset dataset, int row, int column, int pass)
 {
   if (dataset is IntervalCategoryDataset)
   {
     IntervalCategoryDataset dataset1 = (IntervalCategoryDataset) dataset;
     this.drawInterval(g2, state, dataArea, plot, domainAxis, rangeAxis, dataset1, row, column);
   }
   else
     base.drawItem(g2, state, dataArea, plot, domainAxis, rangeAxis, dataset, row, column, pass);
 }
 public virtual void add(CategoryPlot subplot)
 {
   this.add(subplot, 1);
 }
 public virtual void remove(CategoryPlot subplot)
 {
   if (subplot == null)
   {
     string str = "Null 'subplot' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     int num1 = -1;
     int num2 = this.subplots.size();
     for (int index = 0; num1 == -1 && index < num2; ++index)
     {
       if (this.subplots.get(index) == subplot)
         num1 = index;
     }
     if (num1 == -1)
       return;
     this.subplots.remove(num1);
     subplot.setParent((Plot) null);
     subplot.removeChangeListener((PlotChangeListener) this);
     CategoryAxis domainAxis = this.getDomainAxis();
     if (domainAxis != null)
       domainAxis.configure();
     this.fireChangeEvent();
   }
 }
 public static JFreeChart createWaterfallChart(string title, string categoryAxisLabel, string valueAxisLabel, CategoryDataset 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
   {
     CategoryAxis domainAxis = new CategoryAxis(categoryAxisLabel);
     domainAxis.setCategoryMargin(0.0);
     NumberAxis numberAxis = new NumberAxis(valueAxisLabel);
     WaterfallBarRenderer waterfallBarRenderer = new WaterfallBarRenderer();
     if (orientation == PlotOrientation.__\u003C\u003EHORIZONTAL)
     {
       ItemLabelPosition position = new ItemLabelPosition(ItemLabelAnchor.__\u003C\u003ECENTER, TextAnchor.__\u003C\u003ECENTER, TextAnchor.__\u003C\u003ECENTER, Math.PI / 2.0);
       waterfallBarRenderer.setBasePositiveItemLabelPosition(position);
       waterfallBarRenderer.setBaseNegativeItemLabelPosition(position);
     }
     else if (orientation == PlotOrientation.__\u003C\u003EVERTICAL)
     {
       ItemLabelPosition position = new ItemLabelPosition(ItemLabelAnchor.__\u003C\u003ECENTER, TextAnchor.__\u003C\u003ECENTER, TextAnchor.__\u003C\u003ECENTER, 0.0);
       waterfallBarRenderer.setBasePositiveItemLabelPosition(position);
       waterfallBarRenderer.setBaseNegativeItemLabelPosition(position);
     }
     if (num1 != 0)
     {
       StandardCategoryToolTipGenerator toolTipGenerator = new StandardCategoryToolTipGenerator();
       waterfallBarRenderer.setBaseToolTipGenerator((CategoryToolTipGenerator) toolTipGenerator);
     }
     if (num2 != 0)
       waterfallBarRenderer.setBaseItemURLGenerator((CategoryURLGenerator) new StandardCategoryURLGenerator());
     CategoryPlot categoryPlot = new CategoryPlot(dataset, domainAxis, (ValueAxis) numberAxis, (CategoryItemRenderer) waterfallBarRenderer);
     categoryPlot.clearRangeMarkers();
     ValueMarker valueMarker = new ValueMarker(0.0);
     valueMarker.setPaint((Paint) Color.black);
     categoryPlot.addRangeMarker((Marker) valueMarker, Layer.__\u003C\u003EFOREGROUND);
     categoryPlot.setOrientation(orientation);
     JFreeChart.__\u003Cclinit\u003E();
     JFreeChart jfc = new JFreeChart(title, JFreeChart.__\u003C\u003EDEFAULT_TITLE_FONT, (Plot) categoryPlot, num3 != 0);
     ChartFactory.currentTheme.apply(jfc);
     return jfc;
   }
 }
 public static JFreeChart createGanttChart(string title, string categoryAxisLabel, string dateAxisLabel, IntervalCategoryDataset dataset, bool legend, bool tooltips, bool urls)
 {
   int num1 = tooltips ? 1 : 0;
   int num2 = urls ? 1 : 0;
   int num3 = legend ? 1 : 0;
   CategoryAxis domainAxis = new CategoryAxis(categoryAxisLabel);
   DateAxis dateAxis = new DateAxis(dateAxisLabel);
   GanttRenderer ganttRenderer = new GanttRenderer();
   if (num1 != 0)
     ganttRenderer.setBaseToolTipGenerator((CategoryToolTipGenerator) new IntervalCategoryToolTipGenerator("{3} - {4}", DateFormat.getDateInstance()));
   if (num2 != 0)
     ganttRenderer.setBaseItemURLGenerator((CategoryURLGenerator) new StandardCategoryURLGenerator());
   CategoryPlot categoryPlot = new CategoryPlot((CategoryDataset) dataset, domainAxis, (ValueAxis) dateAxis, (CategoryItemRenderer) ganttRenderer);
   categoryPlot.setOrientation(PlotOrientation.__\u003C\u003EHORIZONTAL);
   JFreeChart.__\u003Cclinit\u003E();
   JFreeChart jfc = new JFreeChart(title, JFreeChart.__\u003C\u003EDEFAULT_TITLE_FONT, (Plot) categoryPlot, num3 != 0);
   ChartFactory.currentTheme.apply(jfc);
   return jfc;
 }
 public static JFreeChart createLineChart3D(string title, string categoryAxisLabel, string valueAxisLabel, CategoryDataset 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
   {
     CategoryAxis3D categoryAxis3D = new CategoryAxis3D(categoryAxisLabel);
     NumberAxis3D numberAxis3D = new NumberAxis3D(valueAxisLabel);
     LineRenderer3D lineRenderer3D = new LineRenderer3D();
     if (num1 != 0)
       lineRenderer3D.setBaseToolTipGenerator((CategoryToolTipGenerator) new StandardCategoryToolTipGenerator());
     if (num2 != 0)
       lineRenderer3D.setBaseItemURLGenerator((CategoryURLGenerator) new StandardCategoryURLGenerator());
     CategoryPlot categoryPlot = new CategoryPlot(dataset, (CategoryAxis) categoryAxis3D, (ValueAxis) numberAxis3D, (CategoryItemRenderer) lineRenderer3D);
     categoryPlot.setOrientation(orientation);
     JFreeChart.__\u003Cclinit\u003E();
     JFreeChart jfc = new JFreeChart(title, JFreeChart.__\u003C\u003EDEFAULT_TITLE_FONT, (Plot) categoryPlot, num3 != 0);
     ChartFactory.currentTheme.apply(jfc);
     return jfc;
   }
 }
 public static JFreeChart createBarChart(string title, string categoryAxisLabel, string valueAxisLabel, CategoryDataset 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
   {
     CategoryAxis domainAxis = new CategoryAxis(categoryAxisLabel);
     NumberAxis numberAxis = new NumberAxis(valueAxisLabel);
     BarRenderer barRenderer = new BarRenderer();
     if (orientation == PlotOrientation.__\u003C\u003EHORIZONTAL)
     {
       ItemLabelPosition position1 = new ItemLabelPosition(ItemLabelAnchor.__\u003C\u003EOUTSIDE3, TextAnchor.__\u003C\u003ECENTER_LEFT);
       barRenderer.setBasePositiveItemLabelPosition(position1);
       ItemLabelPosition position2 = new ItemLabelPosition(ItemLabelAnchor.__\u003C\u003EOUTSIDE9, TextAnchor.__\u003C\u003ECENTER_RIGHT);
       barRenderer.setBaseNegativeItemLabelPosition(position2);
     }
     else if (orientation == PlotOrientation.__\u003C\u003EVERTICAL)
     {
       ItemLabelPosition position1 = new ItemLabelPosition(ItemLabelAnchor.__\u003C\u003EOUTSIDE12, TextAnchor.__\u003C\u003EBOTTOM_CENTER);
       barRenderer.setBasePositiveItemLabelPosition(position1);
       ItemLabelPosition position2 = new ItemLabelPosition(ItemLabelAnchor.__\u003C\u003EOUTSIDE6, TextAnchor.__\u003C\u003ETOP_CENTER);
       barRenderer.setBaseNegativeItemLabelPosition(position2);
     }
     if (num1 != 0)
       barRenderer.setBaseToolTipGenerator((CategoryToolTipGenerator) new StandardCategoryToolTipGenerator());
     if (num2 != 0)
       barRenderer.setBaseItemURLGenerator((CategoryURLGenerator) new StandardCategoryURLGenerator());
     CategoryPlot categoryPlot = new CategoryPlot(dataset, domainAxis, (ValueAxis) numberAxis, (CategoryItemRenderer) barRenderer);
     categoryPlot.setOrientation(orientation);
     JFreeChart.__\u003Cclinit\u003E();
     JFreeChart jfc = new JFreeChart(title, JFreeChart.__\u003C\u003EDEFAULT_TITLE_FONT, (Plot) categoryPlot, num3 != 0);
     ChartFactory.currentTheme.apply(jfc);
     return jfc;
   }
 }
 public static JFreeChart createBoxAndWhiskerChart(string title, string categoryAxisLabel, string valueAxisLabel, BoxAndWhiskerCategoryDataset dataset, bool legend)
 {
   int num = legend ? 1 : 0;
   CategoryAxis domainAxis = new CategoryAxis(categoryAxisLabel);
   NumberAxis numberAxis = new NumberAxis(valueAxisLabel);
   numberAxis.setAutoRangeIncludesZero(false);
   BoxAndWhiskerRenderer andWhiskerRenderer = new BoxAndWhiskerRenderer();
   andWhiskerRenderer.setBaseToolTipGenerator((CategoryToolTipGenerator) new BoxAndWhiskerToolTipGenerator());
   CategoryPlot categoryPlot = new CategoryPlot((CategoryDataset) dataset, domainAxis, (ValueAxis) numberAxis, (CategoryItemRenderer) andWhiskerRenderer);
   JFreeChart.__\u003Cclinit\u003E();
   JFreeChart jfc = new JFreeChart(title, JFreeChart.__\u003C\u003EDEFAULT_TITLE_FONT, (Plot) categoryPlot, num != 0);
   ChartFactory.currentTheme.apply(jfc);
   return jfc;
 }