Ejemplo n.º 1
0
 public static JFreeChart createXYBarChart(string title, string xAxisLabel, bool dateAxis, string yAxisLabel, IntervalXYDataset dataset, PlotOrientation orientation, bool legend, bool tooltips, bool urls)
 {
   int num1 = dateAxis ? 1 : 0;
   int num2 = tooltips ? 1 : 0;
   int num3 = urls ? 1 : 0;
   int num4 = legend ? 1 : 0;
   if (orientation == null)
   {
     string str = "Null 'orientation' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     ValueAxis domainAxis;
     if (num1 != 0)
     {
       domainAxis = (ValueAxis) new DateAxis(xAxisLabel);
     }
     else
     {
       NumberAxis numberAxis = new NumberAxis(xAxisLabel);
       numberAxis.setAutoRangeIncludesZero(false);
       domainAxis = (ValueAxis) numberAxis;
     }
     NumberAxis numberAxis1 = new NumberAxis(yAxisLabel);
     XYBarRenderer xyBarRenderer = new XYBarRenderer();
     if (num2 != 0)
     {
       StandardXYToolTipGenerator toolTipGenerator = num1 == 0 ? new StandardXYToolTipGenerator() : StandardXYToolTipGenerator.getTimeSeriesInstance();
       xyBarRenderer.setBaseToolTipGenerator((XYToolTipGenerator) toolTipGenerator);
     }
     if (num3 != 0)
       xyBarRenderer.setURLGenerator((XYURLGenerator) new StandardXYURLGenerator());
     XYPlot xyPlot = new XYPlot((XYDataset) dataset, domainAxis, (ValueAxis) numberAxis1, (XYItemRenderer) xyBarRenderer);
     xyPlot.setOrientation(orientation);
     JFreeChart.__\u003Cclinit\u003E();
     JFreeChart jfc = new JFreeChart(title, JFreeChart.__\u003C\u003EDEFAULT_TITLE_FONT, (Plot) xyPlot, num4 != 0);
     ChartFactory.currentTheme.apply(jfc);
     return jfc;
   }
 }
Ejemplo n.º 2
0
 public static JFreeChart createHistogram(string title, string xAxisLabel, string yAxisLabel, IntervalXYDataset 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);
     NumberAxis numberAxis2 = new NumberAxis(yAxisLabel);
     XYBarRenderer xyBarRenderer = new XYBarRenderer();
     if (num1 != 0)
       xyBarRenderer.setBaseToolTipGenerator((XYToolTipGenerator) new StandardXYToolTipGenerator());
     if (num2 != 0)
       xyBarRenderer.setURLGenerator((XYURLGenerator) new StandardXYURLGenerator());
     XYPlot xyPlot = new XYPlot((XYDataset) dataset, (ValueAxis) numberAxis1, (ValueAxis) numberAxis2, (XYItemRenderer) xyBarRenderer);
     xyPlot.setOrientation(orientation);
     xyPlot.setDomainZeroBaselineVisible(true);
     xyPlot.setRangeZeroBaselineVisible(true);
     JFreeChart.__\u003Cclinit\u003E();
     JFreeChart jfc = new JFreeChart(title, JFreeChart.__\u003C\u003EDEFAULT_TITLE_FONT, (Plot) xyPlot, num3 != 0);
     ChartFactory.currentTheme.apply(jfc);
     return jfc;
   }
 }