Class Plot2D

java.lang.Object
com.iizix.prop.GProp<GProp<?>[]>
com.iizix.prop.PropCnr
com.iizix.prop.ui.chart.plot2d.Plot2D
All Implemented Interfaces:
EventListener, IGProp<GProp<?>[]>, IPropCnr, IPropCnrBooleanSettings<PlotOption>, IPropCnrChoiceSettings<IPlotChoiceOption>, IPropCnrColorSettings<PlotColor>, IPropCnrFillSettings<PlotFill>, IPropCnrFontSettings<PlotFont>, IPropCnrIntegerSettings<PlotInteger>, IPropCnrNumberSettings<PlotNumber>, IPropCnrStringSettings<PlotString>, IPropCnrStrokeSettings<PlotStroke>, IChartContainer, Cloneable
Direct Known Subclasses:
EPlot2D

A chart series is either created in the Designer or constructed at runtime and added to the chart. The Designer chart data series persists in XML and can be predefined and only filled with data at runtime. Another way of adding data is to connect it to a VirtualSpace column in a table containing values in any of the Value number forms.
Author:
Christopher Mindus
  • Field Details

    • DEFAULT

      public static final Atom DEFAULT
      The Atom for the "default" plot ("default"). At least one "default" must be present in the chart in order to be rendered.
  • Constructor Details

    • Plot2D

      public Plot2D(String name)
      Constructs a new plot from a name.
      Parameters:
      name - The name of the plot. The name MUST be a valid Atom name and cannot start with "$".
      Throws:
      NullPointerException - If the name is null.
      IllegalArgumentException - If the name is invalid.
    • Plot2D

      public Plot2D()
      Constructs a new plot without a name.

      This constructor is used by the persistence framework and should not be used.

    • Plot2D

      public Plot2D(Atom atom)
      Constructs a new plot from an Atom name.

      This constructor is used by the persistence framework and should not be used.

      Parameters:
      atom - The atom name.
  • Method Details

    • getContainerType

      public final IChartContainer.Type getContainerType()
      Gets the type of container.
      Specified by:
      getContainerType in interface IChartContainer
      Returns:
      Type.PLOT.
    • clone

      public Plot2D clone()
      Clone must be overridden.
      Overrides:
      clone in class PropCnr
    • getLabelStyle

      public PlotLabelStyle getLabelStyle()
      Gets the LabelStyle option.
      Returns:
      The choice set, or the PlotLabelStyle.DEFAULT if the option is undefined, but really depends on the plot type in the end.
    • getRadialGradient

      public PlotRadialGradient getRadialGradient()
      Gets the RadialGradient option used for pie charts.
      Returns:
      The choice set, or the PlotRadialGradient.NATIVE if the option is undefined.
    • setIndicatorValues

      public Plot2D setIndicatorValues(double... values)
      Sets the values at which an indicator plot (PlotType.INDICATOR) draws its lines, e.g. a threshold. The lines are horizontal at values of the vertical axis when PlotOption.VERTICAL is false, otherwise vertical at values of the horizontal axis.

      Example, a horizontal threshold line at 80 on the default axes:

        Plot2D limit=new Plot2D("limit");
        limit.set(PlotType.INDICATOR);
        limit.set(PlotOption.VERTICAL,false);
        limit.setIndicatorValues(80);
        chart.addPlot(limit);
      

      Parameters:
      values - The values, none to remove the lines.
      Returns:
      this instance for concatenation use.
    • getIndicatorValues

      public double[] getIndicatorValues()
      Gets the values at which an indicator plot draws its lines.
      Returns:
      The values, empty when none is set; an entry that is not a number is skipped.