Klasse PiePlot

java.lang.Object
com.inet.report.chart.plot.AbstractPlot
com.inet.report.chart.plot.PiePlot
Alle implementierten Schnittstellen:
ChartPlot, Serializable
Bekannte direkte Unterklassen:
MultiplePiePlot

public class PiePlot extends AbstractPlot
A general class for plotting data of groups of values. This plot can use data from any class that implements the BaseDataset interface.
Seit:
8.0
Siehe auch:
  • Felddetails

    • DEFAULT_STYLE

      public static final PieStyle DEFAULT_STYLE
      Default chart style with this plot.
    • DEFAULT_ROTATION_ANGLE

      public static final double DEFAULT_ROTATION_ANGLE
      The default rotating angle.
      Siehe auch:
    • DEFAULT_ITEM_LABEL_GAP

      public static final double DEFAULT_ITEM_LABEL_GAP
      The default gap of the item labels.
      Siehe auch:
    • DEFAULT_ITEM_LABEL_BACKGROUND_COLOR

      public static final int DEFAULT_ITEM_LABEL_BACKGROUND_COLOR
      The default background color of the item label.
    • DEFAULT_ITEM_LABEL_OUTLINE_COLOR

      public static final int DEFAULT_ITEM_LABEL_OUTLINE_COLOR
      The default outline color of the item label.
      Siehe auch:
    • DEFAULT_ITEM_LABEL_OUTLINE_STYLE

      public static final int DEFAULT_ITEM_LABEL_OUTLINE_STYLE
      The default outline style of the item label.
      Siehe auch:
    • DEFAULT_ITEM_LABEL_OUTLINE_WIDTH

      public static final int DEFAULT_ITEM_LABEL_OUTLINE_WIDTH
      The default outline width of the item label.
      Siehe auch:
    • DEFAULT_SECTION_DEPTH

      public static final int DEFAULT_SECTION_DEPTH
      The default section depth of a ring chart in percentage.
      Siehe auch:
    • DEFAULT_EXPAND_PERCENT

      public static final double DEFAULT_EXPAND_PERCENT
      The default expand percent.
      Siehe auch:
  • Konstruktordetails

    • PiePlot

      public PiePlot()
      Creates a pie plot with default properties.
      Seit:
      8.0
    • PiePlot

      public PiePlot(PieStyle style)
      Creates a pie plot with defined chart style. Initializes all properties with default values.
      Parameter:
      style - the chart style (null not permitted)
      Seit:
      8.0
      Siehe auch:
  • Methodendetails

    • getDataset

      public BaseDataset getDataset()
      Returns a dataset of type PieDataset.
      Gibt zurück:
      the dataset
      Seit:
      8.0
      Siehe auch:
    • setDataset

      public void setDataset(PieDataset dataset)
      Sets a pie dataset for this chart.
      Parameter:
      dataset - the pie dataset (null not permitted)
      Seit:
      8.0
      Siehe auch:
    • getStyle

      public ChartStyle getStyle()
      Returns the style of this chart, ie. the general category this plot belongs to.
      Angegeben von:
      getStyle in Klasse AbstractPlot
      Gibt zurück:
      the style
      Siehe auch:
    • setStyle

      public void setStyle(PieStyle style)
      Sets the chart style of this plot.
      Parameter:
      style - the style
      Seit:
      8.0
      Siehe auch:
    • isIgnoreZeroValues

      public boolean isIgnoreZeroValues()
      Returns the flag that controls whether or not the null and zero values will be ignored. Default value of this property is false.
      Gibt zurück:
      the flag.
      Seit:
      8.0
      Siehe auch:
    • setIgnoreZeroValues

      public void setIgnoreZeroValues(boolean ignoreZeroValues)
      Sets the flag that controls whether or not the null and zero values will be ignored. Default value of this property is false.
      Parameter:
      ignoreZeroValues - the flag
      Seit:
      8.0
      Siehe auch:
    • getRotationAngle

      public double getRotationAngle()
      Returns the rotation angle of pie. The pie is default rotated on clockwise 90 degrees.
      Gibt zurück:
      the rotation angle.
      Seit:
      8.0
      Siehe auch:
    • setRotationAngle

      public void setRotationAngle(double rotationAngle)
      Sets the rotation angle of pie. The pie is default rotated on clockwise 90 degrees. The default value is DEFAULT_ROTATION_ANGLE
      Parameter:
      rotationAngle - the rotation angle
      Seit:
      8.0
      Siehe auch:
    • getSectionDepth

      public int getSectionDepth()
      Returns the depth of the ring pie sections. The ring section has a default depth of 20 percent.
      Gibt zurück:
      the depth of the sections.
      Seit:
      24.10
      Siehe auch:
    • setSectionDepth

      public void setSectionDepth(int sectionDepth)
      Sets the depth of the ring pie sections. The ring section has a default depth of 20 percent. The default value is DEFAULT_SECTION_DEPTH
      Parameter:
      sectionDepth - the depth of the sections
      Seit:
      24.10
      Siehe auch:
    • getItemLabelGap

      public double getItemLabelGap()
      Returns the gap between the pie and the item label. The value of gap is a percentage of the plot width.
      Gibt zurück:
      the gap
      Seit:
      8.0
      Siehe auch:
    • setItemLabelGap

      public void setItemLabelGap(double itemLabelGap)
      Sets the gap between the pie and the item label. The value of gap is a percentage of the plot width. The default value is DEFAULT_ITEM_LABEL_GAP.
      Parameter:
      itemLabelGap - the item label gap
      Löst aus:
      IllegalArgumentException - if the gap is a negative value.
      Seit:
      8.0
      Siehe auch:
    • isDrawItemLabelOutline

      public boolean isDrawItemLabelOutline()
      Returns whether or not to draw the item label outline.
      Gibt zurück:
      true the outline is to be drawn.
      Seit:
      8.0
      Siehe auch:
    • setDrawItemLabelOutline

      public void setDrawItemLabelOutline(boolean drawOutline)
      Sets whether or not to draw the item label outline.
      Parameter:
      drawOutline - true if outline is to be drawn.
      Seit:
      8.0
      Siehe auch:
    • getItemLabelBackColor

      public int getItemLabelBackColor()
      Returns the ABGR value representing the background color of item labels .
      Gibt zurück:
      the background color.
      Seit:
      8.0
      Siehe auch:
    • setItemLabelBackColor

      public void setItemLabelBackColor(int backgroundColor)
      Sets the ABGR value representing the background color of item labels.
      Parameter:
      backgroundColor - the background color
      Seit:
      8.0
      Siehe auch:
    • getItemLabelOutlineColor

      public int getItemLabelOutlineColor()
      Returns the ABGR value representing the legend outline color.
      Gibt zurück:
      the legend outline color.
      Seit:
      8.0
      Siehe auch:
    • setItemLabelOutlineColor

      public void setItemLabelOutlineColor(int outlineColor)
      Sets the ABGR components of the legend outline color.
      Parameter:
      outlineColor - a color
      Löst aus:
      IllegalArgumentException - if the color is RDC.COLOR_NO_COLOR.
      Seit:
      8.0
      Siehe auch:
    • getItemLabelOutlineStyle

      public int getItemLabelOutlineStyle()
      Returns the border line style of item labels.
      Gibt zurück:
      outline style.
      Seit:
      8.0
      Siehe auch:
    • setItemLabelOutlineStyle

      public void setItemLabelOutlineStyle(int itemLabelOutlineStyle)
      Sets the border line style of item labels.
      Parameter:
      itemLabelOutlineStyle - a outline style
      Löst aus:
      IllegalArgumentException - by unsupported line style.
      Seit:
      8.0
      Siehe auch:
      • getItemLabelOutlineStyle()
      • BorderPropertiesConstants.LINE_STYLE_DASHED
      • BorderPropertiesConstants.LINE_STYLE_DOTTED
      • BorderPropertiesConstants.LINE_STYLE_SINGLE
      • BorderPropertiesConstants.NO_LINE
    • getItemLabelOutlineWidth

      public int getItemLabelOutlineWidth()
      Returns the outline width of item labels.
      Gibt zurück:
      the outline width in twips.
      Seit:
      8.0
      Siehe auch:
    • setItemLabelOutlineWidth

      public void setItemLabelOutlineWidth(int itemLabelOutlineWidth)
      Sets the item labels outline width in twips.
      Parameter:
      itemLabelOutlineWidth - the outline width
      Löst aus:
      IllegalArgumentException - if width is less than 1.
      Seit:
      8.0
      Siehe auch:
    • getLegendLayout

      public PieLegendLayout getLegendLayout()
      Returns the legend layout. A legend can show section names, data values and percentage of values.
      Gibt zurück:
      the legend layout.
      Seit:
      8.0
      Siehe auch:
    • setLegendLayout

      public void setLegendLayout(PieLegendLayout legendLayout)
      Sets the legend layout. A legend can show section names, data values and percentage of values.
      Parameter:
      legendLayout - a legend layout (null not permitted)
      Seit:
      8.0
      Siehe auch:
    • getSectionIndexes

      public int[] getSectionIndexes()
      Returns the sections indexes which will be expanded.
      Gibt zurück:
      the array of indexes.
      Seit:
      8.0
      Siehe auch:
    • setSectionIndexes

      public void setSectionIndexes(int[] sectionIndexes)
      Sets the sections indexes which will be expanded. This function define the sections of pie which are detached. The value of the detach distance you can set with setExpandPercent(double). The array of indexes is 0 based.
      Parameter:
      sectionIndexes - the array of sections indexes (null not permitted)
      Löst aus:
      IllegalArgumentException - if the array is null.
      Seit:
      8.0
      Siehe auch:
    • getExpandPercent

      public double getExpandPercent()
      Returns the detach percentage of sections selected with setSectionIndexes(int[]).
      Gibt zurück:
      the percentage value.
      Seit:
      8.0
      Siehe auch:
    • setExpandPercent

      public void setExpandPercent(double expandPercent)
      Sets the detach percentage of sections selected with setSectionIndexes(int[]).
      Parameter:
      expandPercent - the expand percentage (0.30 = 30 percent)
      Löst aus:
      IllegalArgumentException - if the percent is a negative value.
      Seit:
      8.0
      Siehe auch:
    • refreshAutoTitles

      public void refreshAutoTitles(Chart2 chart)
      Reads out the data column names from dataset and refreshes the chart labels. Please use this function to refresh the chart labels if the data was be changed.
      Angegeben von:
      refreshAutoTitles in Schnittstelle ChartPlot
      Angegeben von:
      refreshAutoTitles in Klasse AbstractPlot
      Parameter:
      chart - the chart
    • getSubProperties

      protected StringBuilder getSubProperties(int depth)
      Returns the serialized simple properties of subclasses.
      Setzt außer Kraft:
      getSubProperties in Klasse AbstractPlot
      Parameter:
      depth - the depth of XML indent
      Gibt zurück:
      the properties.
    • saveSubProperties

      protected void saveSubProperties(PrintWriter out, int depth)
      Writes the intern properties to output. Overwrites this to save intern properties direct to PrintWriter without building a StringBuilder.
      Setzt außer Kraft:
      saveSubProperties in Klasse AbstractPlot
      Parameter:
      out - the output
      depth - the depth of XML indent
    • readProperties

      public void readProperties(Element element, Chart2 chart)
      Reads the chart properties from the DOMParser Element.
      Angegeben von:
      readProperties in Schnittstelle ChartPlot
      Setzt außer Kraft:
      readProperties in Klasse AbstractPlot
      Parameter:
      element - the DOMParser Element
      chart - the chart
    • readDataset

      protected void readDataset(Element element, Chart2 chart)
      Reads the dataset properties from DOM element.
      Parameter:
      element - the DOM element
      chart - the chart
      Seit:
      8.0