Class StockOneGroupDataset

java.lang.Object
com.inet.report.chart.dataset.AbstractDataset
All Implemented Interfaces:
BaseDataset, StockDataset, Serializable

public class StockOneGroupDataset extends StockForEachRecordDataset
This is a dataset used by stock charts. This evaluates data sorted by one group for four data fields (open, close, high, low).
Since:
8.0
See Also:
  • Constructor Details

    • StockOneGroupDataset

      public StockOneGroupDataset(Chart2 chart)
      Creates a new empty dataset.
      Parameters:
      chart - the chart (null not permitted)
      Since:
      8.0
  • Method Details

    • getCategoryGroup

      public Group getCategoryGroup()
      Returns the category group. The category group is the first group of chart.
      Overrides:
      getCategoryGroup in class StockForAllRecordsDataset
      Returns:
      the group or null if this group was not initialized.
      Since:
      8.0
      See Also:
    • setCategoryGroup

      public void setCategoryGroup(Field field)
      Creates a category group on this field. This group is for sorting and consolidating records with same values on the group axis, e.g. the x axis on PlotOrientation.VERTICAL plots. To change the sort order of the data in this group get this with getCategoryGroup() and use the Group properties. SummaryField, SpecialField and GroupField are unsupported field types.
      Parameters:
      field - the group field (null not permitted)
      Throws:
      IllegalArgumentException - if field is null or has an unsupported field type.
      Since:
      8.0
      See Also:
    • removeCategoryGroup

      public void removeCategoryGroup()
      Removes the category group. Note: this dataset is incomplete without a category group and cannot be used by the chart in this case.
      Since:
      8.0
      See Also:
    • resetSummaryFields

      protected void resetSummaryFields(Group group)
      Resets the group properties of summary fields.
      Parameters:
      group - the group
      Since:
      8.0
    • verify

      public String verify(ChartStyle style)
      Verifies the group and sum properties of current dataset.
      Specified by:
      verify in interface BaseDataset
      Overrides:
      verify in class StockForAllRecordsDataset
      Parameters:
      style - the chart style
      Returns:
      the error message or empty string if all properties are correct.
    • getReferencedObject

      public List getReferencedObject()
      FOR INTERNAL USE ONLY
      Specified by:
      getReferencedObject in interface BaseDataset
      Overrides:
      getReferencedObject in class com.inet.report.chart.dataset.AbstractDataset
      Returns:
      FOR INTERNAL USE ONLY
    • saveGroups

      protected void saveGroups(PrintWriter out, int depth)
      Overrides:
      saveGroups in class com.inet.report.chart.dataset.AbstractDataset
    • getName

      protected String getName()
      FOR INTERNAL USE ONLY
      Overrides:
      getName in class StockForEachRecordDataset
      Returns:
      name name for this dataset