예제 #1
0
 public static JFreeChart createXYLineChart(string title, string xAxisLabel, string yAxisLabel, XYDataset 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);
     XYLineAndShapeRenderer andShapeRenderer = new XYLineAndShapeRenderer(true, false);
     XYPlot xyPlot = new XYPlot(dataset, (ValueAxis) numberAxis1, (ValueAxis) numberAxis2, (XYItemRenderer) andShapeRenderer);
     xyPlot.setOrientation(orientation);
     if (num1 != 0)
       andShapeRenderer.setBaseToolTipGenerator((XYToolTipGenerator) new StandardXYToolTipGenerator());
     if (num2 != 0)
       andShapeRenderer.setURLGenerator((XYURLGenerator) new StandardXYURLGenerator());
     JFreeChart.__\u003Cclinit\u003E();
     JFreeChart jfc = new JFreeChart(title, JFreeChart.__\u003C\u003EDEFAULT_TITLE_FONT, (Plot) xyPlot, num3 != 0);
     ChartFactory.currentTheme.apply(jfc);
     return jfc;
   }
 }
예제 #2
0
 public MarkerAxisBand(NumberAxis axis, double topOuterGap, double topInnerGap, double bottomOuterGap, double bottomInnerGap, Font font)
 {
   base.\u002Ector();
   MarkerAxisBand markerAxisBand = this;
   this.axis = axis;
   this.topOuterGap = topOuterGap;
   this.topInnerGap = topInnerGap;
   this.bottomOuterGap = bottomOuterGap;
   this.bottomInnerGap = bottomInnerGap;
   this.font = font;
   this.markers = (List) new ArrayList();
 }
예제 #3
0
 public ColorBar(string label)
 {
   base.\u002Ector();
   ColorBar colorBar = this;
   this.colorBarThickness = 0;
   this.colorBarThicknessPercent = 0.1;
   this.colorPalette = (ColorPalette) null;
   this.colorBarLength = 0;
   NumberAxis numberAxis = new NumberAxis(label);
   numberAxis.setAutoRangeIncludesZero(false);
   this.axis = (ValueAxis) numberAxis;
   this.axis.setLowerMargin(0.0);
   this.axis.setUpperMargin(0.0);
   this.colorPalette = (ColorPalette) new RainbowPalette();
   this.colorBarThickness = 0;
   this.colorBarThicknessPercent = 0.1;
   this.outerGap = 2;
   this.colorPalette.setMinZ(this.axis.getRange().getLowerBound());
   this.colorPalette.setMaxZ(this.axis.getRange().getUpperBound());
 }
예제 #4
0
 public ThermometerPlot(ValueDataset dataset)
 {
   ThermometerPlot thermometerPlot = this;
   this.lowerBound = 0.0;
   this.upperBound = 100.0;
   this.bulbRadius = 40;
   this.columnRadius = 20;
   this.gap = 5;
   this.thermometerStroke = (Stroke) new BasicStroke(1f);
   this.thermometerPaint = (Paint) Color.black;
   this.units = 2;
   this.valueLocation = 3;
   this.axisLocation = 2;
   this.valueFont = new Font("SansSerif", 1, 16);
   this.valuePaint = (Paint) Color.white;
   this.valueFormat = (NumberFormat) new DecimalFormat();
   this.mercuryPaint = (Paint) Color.lightGray;
   this.showValueLines = false;
   this.subrange = -1;
   double[][] numArray1 = new double[3][];
   int index1 = 0;
   double[] numArray2 = new double[4];
   int index2 = 0;
   double num1 = 0.0;
   numArray2[index2] = num1;
   int index3 = 1;
   double num2 = 50.0;
   numArray2[index3] = num2;
   int index4 = 2;
   double num3 = 0.0;
   numArray2[index4] = num3;
   int index5 = 3;
   double num4 = 50.0;
   numArray2[index5] = num4;
   numArray1[index1] = numArray2;
   int index6 = 1;
   double[] numArray3 = new double[4];
   int index7 = 0;
   double num5 = 50.0;
   numArray3[index7] = num5;
   int index8 = 1;
   double num6 = 75.0;
   numArray3[index8] = num6;
   int index9 = 2;
   double num7 = 50.0;
   numArray3[index9] = num7;
   int index10 = 3;
   double num8 = 75.0;
   numArray3[index10] = num8;
   numArray1[index6] = numArray3;
   int index11 = 2;
   double[] numArray4 = new double[4];
   int index12 = 0;
   double num9 = 75.0;
   numArray4[index12] = num9;
   int index13 = 1;
   double num10 = 100.0;
   numArray4[index13] = num10;
   int index14 = 2;
   double num11 = 75.0;
   numArray4[index14] = num11;
   int index15 = 3;
   double num12 = 100.0;
   numArray4[index15] = num12;
   numArray1[index11] = numArray4;
   this.subrangeInfo = numArray1;
   this.followDataInSubranges = false;
   this.useSubrangePaint = true;
   Paint[] paintArray = new Paint[3];
   int index16 = 0;
   // ISSUE: variable of the null type
   __Null local1 = Color.green;
   paintArray[index16] = (Paint) local1;
   int index17 = 1;
   // ISSUE: variable of the null type
   __Null local2 = Color.orange;
   paintArray[index17] = (Paint) local2;
   int index18 = 2;
   // ISSUE: variable of the null type
   __Null local3 = Color.red;
   paintArray[index18] = (Paint) local3;
   this.subrangePaint = paintArray;
   this.subrangeIndicatorsVisible = true;
   this.subrangeIndicatorStroke = (Stroke) new BasicStroke(2f);
   this.rangeIndicatorStroke = (Stroke) new BasicStroke(3f);
   RectangleInsets.__\u003Cclinit\u003E();
   this.padding = new RectangleInsets(UnitType.__\u003C\u003ERELATIVE, 0.05, 0.05, 0.05, 0.05);
   this.dataset = dataset;
   if (dataset != null)
     dataset.addChangeListener((DatasetChangeListener) this);
   NumberAxis numberAxis = new NumberAxis((string) null);
   numberAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
   numberAxis.setAxisLineVisible(false);
   numberAxis.setPlot((Plot) this);
   numberAxis.addChangeListener((AxisChangeListener) this);
   this.rangeAxis = (ValueAxis) numberAxis;
   this.setAxisRange();
 }
예제 #5
0
 public static JFreeChart createXYStepChart(string title, string xAxisLabel, string yAxisLabel, XYDataset 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
   {
     DateAxis dateAxis = new DateAxis(xAxisLabel);
     NumberAxis numberAxis = new NumberAxis(yAxisLabel);
     numberAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
     StandardXYToolTipGenerator toolTipGenerator = (StandardXYToolTipGenerator) null;
     if (num1 != 0)
       toolTipGenerator = new StandardXYToolTipGenerator();
     StandardXYURLGenerator standardXyurlGenerator = (StandardXYURLGenerator) null;
     if (num2 != 0)
       standardXyurlGenerator = new StandardXYURLGenerator();
     XYStepRenderer xyStepRenderer = new XYStepRenderer((XYToolTipGenerator) toolTipGenerator, (XYURLGenerator) standardXyurlGenerator);
     XYPlot xyPlot = new XYPlot(dataset, (ValueAxis) dateAxis, (ValueAxis) numberAxis, (XYItemRenderer) null);
     xyPlot.setRenderer((XYItemRenderer) xyStepRenderer);
     xyPlot.setOrientation(orientation);
     xyPlot.setDomainCrosshairVisible(false);
     xyPlot.setRangeCrosshairVisible(false);
     JFreeChart.__\u003Cclinit\u003E();
     JFreeChart jfc = new JFreeChart(title, JFreeChart.__\u003C\u003EDEFAULT_TITLE_FONT, (Plot) xyPlot, num3 != 0);
     ChartFactory.currentTheme.apply(jfc);
     return jfc;
   }
 }
예제 #6
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;
   }
 }
예제 #7
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;
   }
 }
예제 #8
0
 public static JFreeChart createPolarChart(string title, XYDataset dataset, bool legend, bool tooltips, bool urls)
 {
   int num = legend ? 1 : 0;
   PolarPlot polarPlot = new PolarPlot();
   polarPlot.setDataset(dataset);
   NumberAxis numberAxis = new NumberAxis();
   numberAxis.setAxisLineVisible(false);
   numberAxis.setTickMarksVisible(false);
   numberAxis.setTickLabelInsets(new RectangleInsets(0.0, 0.0, 0.0, 0.0));
   polarPlot.setAxis((ValueAxis) numberAxis);
   polarPlot.setRenderer((PolarItemRenderer) new DefaultPolarItemRenderer());
   JFreeChart.__\u003Cclinit\u003E();
   JFreeChart jfc = new JFreeChart(title, JFreeChart.__\u003C\u003EDEFAULT_TITLE_FONT, (Plot) polarPlot, num != 0);
   ChartFactory.currentTheme.apply(jfc);
   return jfc;
 }
예제 #9
0
 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;
   }
 }
예제 #10
0
 public static JFreeChart createCandlestickChart(string title, string timeAxisLabel, string valueAxisLabel, OHLCDataset dataset, bool legend)
 {
   int num = legend ? 1 : 0;
   DateAxis dateAxis = new DateAxis(timeAxisLabel);
   NumberAxis numberAxis = new NumberAxis(valueAxisLabel);
   XYPlot xyPlot = new XYPlot((XYDataset) dataset, (ValueAxis) dateAxis, (ValueAxis) numberAxis, (XYItemRenderer) null);
   xyPlot.setRenderer((XYItemRenderer) new CandlestickRenderer());
   JFreeChart.__\u003Cclinit\u003E();
   JFreeChart jfc = new JFreeChart(title, JFreeChart.__\u003C\u003EDEFAULT_TITLE_FONT, (Plot) xyPlot, num != 0);
   ChartFactory.currentTheme.apply(jfc);
   return jfc;
 }
예제 #11
0
 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;
   }
 }
예제 #12
0
 public static JFreeChart createWindPlot(string title, string xAxisLabel, string yAxisLabel, WindDataset dataset, bool legend, bool tooltips, bool urls)
 {
   int num1 = tooltips ? 1 : 0;
   int num2 = urls ? 1 : 0;
   int num3 = legend ? 1 : 0;
   DateAxis dateAxis = new DateAxis(xAxisLabel);
   NumberAxis numberAxis = new NumberAxis(yAxisLabel);
   numberAxis.setRange(-12.0, 12.0);
   WindItemRenderer windItemRenderer = new WindItemRenderer();
   if (num1 != 0)
     windItemRenderer.setBaseToolTipGenerator((XYToolTipGenerator) new StandardXYToolTipGenerator());
   if (num2 != 0)
     windItemRenderer.setURLGenerator((XYURLGenerator) new StandardXYURLGenerator());
   XYPlot xyPlot = new XYPlot((XYDataset) dataset, (ValueAxis) dateAxis, (ValueAxis) numberAxis, (XYItemRenderer) windItemRenderer);
   JFreeChart.__\u003Cclinit\u003E();
   JFreeChart jfc = new JFreeChart(title, JFreeChart.__\u003C\u003EDEFAULT_TITLE_FONT, (Plot) xyPlot, num3 != 0);
   ChartFactory.currentTheme.apply(jfc);
   return jfc;
 }
예제 #13
0
 public static JFreeChart createBoxAndWhiskerChart(string title, string timeAxisLabel, string valueAxisLabel, BoxAndWhiskerXYDataset dataset, bool legend)
 {
   int num = legend ? 1 : 0;
   DateAxis dateAxis = new DateAxis(timeAxisLabel);
   NumberAxis numberAxis = new NumberAxis(valueAxisLabel);
   numberAxis.setAutoRangeIncludesZero(false);
   XYBoxAndWhiskerRenderer andWhiskerRenderer = new XYBoxAndWhiskerRenderer(10.0);
   XYPlot xyPlot = new XYPlot((XYDataset) dataset, (ValueAxis) dateAxis, (ValueAxis) numberAxis, (XYItemRenderer) andWhiskerRenderer);
   JFreeChart.__\u003Cclinit\u003E();
   JFreeChart jfc = new JFreeChart(title, JFreeChart.__\u003C\u003EDEFAULT_TITLE_FONT, (Plot) xyPlot, num != 0);
   ChartFactory.currentTheme.apply(jfc);
   return jfc;
 }
예제 #14
0
 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;
 }
예제 #15
0
 public static JFreeChart createHighLowChart(string title, string timeAxisLabel, string valueAxisLabel, OHLCDataset dataset, Timeline timeline, bool legend)
 {
   int num = legend ? 1 : 0;
   DateAxis dateAxis = new DateAxis(timeAxisLabel);
   dateAxis.setTimeline(timeline);
   NumberAxis numberAxis = new NumberAxis(valueAxisLabel);
   HighLowRenderer highLowRenderer = new HighLowRenderer();
   highLowRenderer.setBaseToolTipGenerator((XYToolTipGenerator) new HighLowItemLabelGenerator());
   XYPlot xyPlot = new XYPlot((XYDataset) dataset, (ValueAxis) dateAxis, (ValueAxis) numberAxis, (XYItemRenderer) highLowRenderer);
   JFreeChart.__\u003Cclinit\u003E();
   JFreeChart jfc = new JFreeChart(title, JFreeChart.__\u003C\u003EDEFAULT_TITLE_FONT, (Plot) xyPlot, num != 0);
   ChartFactory.currentTheme.apply(jfc);
   return jfc;
 }
예제 #16
0
 public static JFreeChart createLineChart(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);
     LineAndShapeRenderer andShapeRenderer = new LineAndShapeRenderer(true, false);
     if (num1 != 0)
       andShapeRenderer.setBaseToolTipGenerator((CategoryToolTipGenerator) new StandardCategoryToolTipGenerator());
     if (num2 != 0)
       andShapeRenderer.setBaseItemURLGenerator((CategoryURLGenerator) new StandardCategoryURLGenerator());
     CategoryPlot categoryPlot = new CategoryPlot(dataset, domainAxis, (ValueAxis) numberAxis, (CategoryItemRenderer) andShapeRenderer);
     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;
   }
 }
예제 #17
0
 public static JFreeChart createTimeSeriesChart(string title, string timeAxisLabel, string valueAxisLabel, XYDataset dataset, bool legend, bool tooltips, bool urls)
 {
   int num1 = tooltips ? 1 : 0;
   int num2 = urls ? 1 : 0;
   int num3 = legend ? 1 : 0;
   DateAxis dateAxis = new DateAxis(timeAxisLabel);
   dateAxis.setLowerMargin(0.02);
   dateAxis.setUpperMargin(0.02);
   NumberAxis numberAxis = new NumberAxis(valueAxisLabel);
   numberAxis.setAutoRangeIncludesZero(false);
   XYPlot xyPlot = new XYPlot(dataset, (ValueAxis) dateAxis, (ValueAxis) numberAxis, (XYItemRenderer) null);
   StandardXYToolTipGenerator toolTipGenerator = (StandardXYToolTipGenerator) null;
   if (num1 != 0)
     toolTipGenerator = StandardXYToolTipGenerator.getTimeSeriesInstance();
   StandardXYURLGenerator standardXyurlGenerator = (StandardXYURLGenerator) null;
   if (num2 != 0)
     standardXyurlGenerator = new StandardXYURLGenerator();
   XYLineAndShapeRenderer andShapeRenderer = new XYLineAndShapeRenderer(true, false);
   andShapeRenderer.setBaseToolTipGenerator((XYToolTipGenerator) toolTipGenerator);
   andShapeRenderer.setURLGenerator((XYURLGenerator) standardXyurlGenerator);
   xyPlot.setRenderer((XYItemRenderer) andShapeRenderer);
   JFreeChart.__\u003Cclinit\u003E();
   JFreeChart jfc = new JFreeChart(title, JFreeChart.__\u003C\u003EDEFAULT_TITLE_FONT, (Plot) xyPlot, num3 != 0);
   ChartFactory.currentTheme.apply(jfc);
   return jfc;
 }