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 createStackedAreaChart(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); StackedAreaRenderer stackedAreaRenderer = new StackedAreaRenderer(); if (num1 != 0) stackedAreaRenderer.setBaseToolTipGenerator((CategoryToolTipGenerator) new StandardCategoryToolTipGenerator()); if (num2 != 0) stackedAreaRenderer.setBaseItemURLGenerator((CategoryURLGenerator) new StandardCategoryURLGenerator()); CategoryPlot categoryPlot = new CategoryPlot(dataset, domainAxis, (ValueAxis) numberAxis, (CategoryItemRenderer) stackedAreaRenderer); 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; } }