public SlidingCategoryDataset(CategoryDataset underlying, int firstColumn, int maxColumns)
 {
   SlidingCategoryDataset slidingCategoryDataset = this;
   this.underlying = underlying;
   this.firstCategoryIndex = firstColumn;
   this.maximumCategoryCount = maxColumns;
 }
 public CategoryItemEntity(Shape area, string toolTipText, string urlText, CategoryDataset dataset, IComparable rowKey, IComparable columnKey)
   : base(area, toolTipText, urlText)
 {
   CategoryItemEntity categoryItemEntity = this;
   if (dataset == null)
   {
     string str = "Null 'dataset' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     this.dataset = dataset;
     this.rowKey = rowKey;
     this.columnKey = columnKey;
     this.series = dataset.getRowIndex(rowKey);
     this.category = (object) columnKey;
     this.categoryIndex = dataset.getColumnIndex(columnKey);
   }
 }
 public CategoryItemEntity(Shape area, string toolTipText, string urlText, CategoryDataset dataset, int series, object category, int categoryIndex)
   : base(area, toolTipText, urlText)
 {
   CategoryItemEntity categoryItemEntity = this;
   if (dataset == null)
   {
     string str = "Null 'dataset' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     this.dataset = dataset;
     this.series = series;
     this.category = category;
     this.categoryIndex = categoryIndex;
     this.rowKey = dataset.getRowKey(series);
     this.columnKey = dataset.getColumnKey(categoryIndex);
   }
 }
 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);
 }
Exemplo n.º 5
0
 public CategoryPlot(CategoryDataset dataset, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryItemRenderer renderer)
 {
   CategoryPlot categoryPlot = this;
   this.renderingOrder = DatasetRenderingOrder.__\u003C\u003EREVERSE;
   this.columnRenderingOrder = SortOrder.__\u003C\u003EASCENDING;
   this.rowRenderingOrder = SortOrder.__\u003C\u003EASCENDING;
   this.rangeCrosshairLockedOnData = true;
   this.orientation = PlotOrientation.__\u003C\u003EVERTICAL;
   this.domainAxes = new ObjectList();
   this.domainAxisLocations = new ObjectList();
   this.rangeAxes = new ObjectList();
   this.rangeAxisLocations = new ObjectList();
   this.datasetToDomainAxesMap = new TreeMap();
   this.datasetToRangeAxesMap = new TreeMap();
   this.renderers = new ObjectList();
   this.datasets = new ObjectList();
   this.datasets.set(0, (object) dataset);
   if (dataset != null)
     dataset.addChangeListener((DatasetChangeListener) this);
   this.axisOffset = RectangleInsets.__\u003C\u003EZERO_INSETS;
   this.setDomainAxisLocation(AxisLocation.__\u003C\u003EBOTTOM_OR_LEFT, false);
   this.setRangeAxisLocation(AxisLocation.__\u003C\u003ETOP_OR_LEFT, false);
   this.renderers.set(0, (object) renderer);
   if (renderer != null)
   {
     renderer.setPlot(this);
     renderer.addChangeListener((RendererChangeListener) this);
   }
   this.domainAxes.set(0, (object) domainAxis);
   this.mapDatasetToDomainAxis(0, 0);
   if (domainAxis != null)
   {
     domainAxis.setPlot((Plot) this);
     domainAxis.addChangeListener((AxisChangeListener) this);
   }
   this.drawSharedDomainAxis = false;
   this.rangeAxes.set(0, (object) rangeAxis);
   this.mapDatasetToRangeAxis(0, 0);
   if (rangeAxis != null)
   {
     rangeAxis.setPlot((Plot) this);
     rangeAxis.addChangeListener((AxisChangeListener) this);
   }
   this.configureDomainAxes();
   this.configureRangeAxes();
   this.domainGridlinesVisible = false;
   this.domainGridlinePosition = CategoryAnchor.__\u003C\u003EMIDDLE;
   this.domainGridlineStroke = CategoryPlot.__\u003C\u003EDEFAULT_GRIDLINE_STROKE;
   this.domainGridlinePaint = CategoryPlot.__\u003C\u003EDEFAULT_GRIDLINE_PAINT;
   this.rangeZeroBaselineVisible = false;
   this.rangeZeroBaselinePaint = (Paint) Color.black;
   this.rangeZeroBaselineStroke = (Stroke) new BasicStroke(0.5f);
   this.rangeGridlinesVisible = true;
   this.rangeGridlineStroke = CategoryPlot.__\u003C\u003EDEFAULT_GRIDLINE_STROKE;
   this.rangeGridlinePaint = CategoryPlot.__\u003C\u003EDEFAULT_GRIDLINE_PAINT;
   this.rangeMinorGridlinesVisible = false;
   this.rangeMinorGridlineStroke = CategoryPlot.__\u003C\u003EDEFAULT_GRIDLINE_STROKE;
   this.rangeMinorGridlinePaint = (Paint) Color.white;
   this.foregroundDomainMarkers = (Map) new HashMap();
   this.backgroundDomainMarkers = (Map) new HashMap();
   this.foregroundRangeMarkers = (Map) new HashMap();
   this.backgroundRangeMarkers = (Map) new HashMap();
   this.anchorValue = 0.0;
   this.domainCrosshairVisible = false;
   this.domainCrosshairStroke = CategoryPlot.__\u003C\u003EDEFAULT_CROSSHAIR_STROKE;
   this.domainCrosshairPaint = CategoryPlot.__\u003C\u003EDEFAULT_CROSSHAIR_PAINT;
   this.rangeCrosshairVisible = false;
   this.rangeCrosshairValue = 0.0;
   this.rangeCrosshairStroke = CategoryPlot.__\u003C\u003EDEFAULT_CROSSHAIR_STROKE;
   this.rangeCrosshairPaint = CategoryPlot.__\u003C\u003EDEFAULT_CROSSHAIR_PAINT;
   this.annotations = (List) new ArrayList();
   this.rangePannable = false;
 }
 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);
 }
Exemplo n.º 7
0
 public SpiderWebPlot(CategoryDataset dataset, TableOrder extract)
 {
   SpiderWebPlot spiderWebPlot = this;
   this.webFilled = true;
   if (extract == null)
   {
     string str = "Null 'extract' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     this.dataset = dataset;
     if (dataset != null)
       dataset.addChangeListener((DatasetChangeListener) this);
     this.dataExtractOrder = extract;
     this.headPercent = 0.01;
     this.axisLabelGap = 0.1;
     this.axisLinePaint = (Paint) Color.black;
     this.axisLineStroke = (Stroke) new BasicStroke(1f);
     this.interiorGap = 0.25;
     this.startAngle = 90.0;
     this.direction = Rotation.__\u003C\u003ECLOCKWISE;
     this.maxValue = -1.0;
     this.seriesPaint = (Paint) null;
     this.seriesPaintList = new PaintList();
     this.baseSeriesPaint = (Paint) null;
     this.seriesOutlinePaint = (Paint) null;
     this.seriesOutlinePaintList = new PaintList();
     this.baseSeriesOutlinePaint = Plot.__\u003C\u003EDEFAULT_OUTLINE_PAINT;
     this.seriesOutlineStroke = (Stroke) null;
     this.seriesOutlineStrokeList = new StrokeList();
     this.baseSeriesOutlineStroke = Plot.__\u003C\u003EDEFAULT_OUTLINE_STROKE;
     this.labelFont = SpiderWebPlot.__\u003C\u003EDEFAULT_LABEL_FONT;
     this.labelPaint = SpiderWebPlot.__\u003C\u003EDEFAULT_LABEL_PAINT;
     this.labelGenerator = (CategoryItemLabelGenerator) new StandardCategoryItemLabelGenerator();
     this.legendItemShape = Plot.__\u003C\u003EDEFAULT_LEGEND_ITEM_CIRCLE;
   }
 }
Exemplo n.º 8
0
 public SpiderWebPlot(CategoryDataset dataset)
   : this(dataset, TableOrder.__\u003C\u003EBY_ROW)
 {
 }
Exemplo n.º 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;
   }
 }
Exemplo n.º 10
0
 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;
   }
 }
Exemplo n.º 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;
   }
 }
Exemplo n.º 12
0
 public static JFreeChart createMultiplePieChart3D(string title, CategoryDataset dataset, TableOrder order, bool legend, bool tooltips, bool urls)
 {
   int num1 = tooltips ? 1 : 0;
   int num2 = urls ? 1 : 0;
   int num3 = legend ? 1 : 0;
   if (order == null)
   {
     string str = "Null 'order' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     MultiplePiePlot multiplePiePlot = new MultiplePiePlot(dataset);
     multiplePiePlot.setDataExtractOrder(order);
     multiplePiePlot.setBackgroundPaint((Paint) null);
     multiplePiePlot.setOutlineStroke((Stroke) null);
     JFreeChart.__\u003Cclinit\u003E();
     JFreeChart pieChart = new JFreeChart((Plot) new PiePlot3D((PieDataset) null));
     TextTitle.__\u003Cclinit\u003E();
     TextTitle title1 = new TextTitle("Series Title", new Font("SansSerif", 1, 12));
     title1.setPosition(RectangleEdge.__\u003C\u003EBOTTOM);
     pieChart.setTitle(title1);
     pieChart.removeLegend();
     pieChart.setBackgroundPaint((Paint) null);
     multiplePiePlot.setPieChart(pieChart);
     if (num1 != 0)
     {
       StandardPieToolTipGenerator toolTipGenerator = new StandardPieToolTipGenerator();
       ((PiePlot) multiplePiePlot.getPieChart().getPlot()).setToolTipGenerator((PieToolTipGenerator) toolTipGenerator);
     }
     if (num2 != 0)
     {
       StandardPieURLGenerator standardPieUrlGenerator = new StandardPieURLGenerator();
       ((PiePlot) multiplePiePlot.getPieChart().getPlot()).setURLGenerator((PieURLGenerator) standardPieUrlGenerator);
     }
     JFreeChart.__\u003Cclinit\u003E();
     JFreeChart jfc = new JFreeChart(title, JFreeChart.__\u003C\u003EDEFAULT_TITLE_FONT, (Plot) multiplePiePlot, num3 != 0);
     ChartFactory.currentTheme.apply(jfc);
     return jfc;
   }
 }