Class ChartLassoEvent

java.lang.Object
com.jbstrap.core.event.BaseEvent
com.jbstrap.core.event.ChartLassoEvent

public class ChartLassoEvent extends BaseEvent
Chart lasso event This event provides access to the following data:
  • @return The client instance that triggered the event
  • The chart canvas instance containing the chart that triggered the event
  • The chart instance that triggered the event
  • All series objects within the selection
  • The name of all series objects within the selection
  • All selected records
Since:
4.0
Author:
JBStrap
  • Constructor Details

    • ChartLassoEvent

      public ChartLassoEvent()
  • Method Details

    • setChart

      protected ChartLassoEvent setChart(BaseChart<?> chart)
      Parameters:
      chart - The chart instance that triggered the event
      Returns:
      Chart lasso event
    • addRecords

      protected ChartLassoEvent addRecords(Series series, List<Record> records)
      Adds a selected record to the event.
      Parameters:
      series - The series instance containing the record
      records - The selected record instance
      Returns:
      Chart lasso event
    • setCanvas

      protected ChartLassoEvent setCanvas(ChartCanvas canvas)
      Sets the chart component that triggered the event.
      Parameters:
      canvas - The chart canvas component that triggered the event
      Returns:
      Chart lasso event
    • getCanvas

      public ChartCanvas getCanvas()
      Gets the chart canvas component that triggered the event.
      Returns:
      The chart canvas component that triggered the event
    • getChart

      public BaseChart<?> getChart()
      Gets the chart that triggered the event.
      Returns:
      The chart component that triggered the event
    • getSeriesNames

      public List<String> getSeriesNames()
      Gets the name of the series the data points of which were selected by the user.
      Returns:
      A list containing series names selected by the user
    • getSeriesByName

      public Series getSeriesByName(String seriesName)
      Gets a series instance based on its name.
      Parameters:
      seriesName - Series name
      Returns:
      Series instance corresponding to the specified name or null if there is no series with the specified name in the event
    • getAllRecords

      public List<Record> getAllRecords()
      Gets all selected records.
      Returns:
      A list containing all records selected by the user, irrespectively of which series they are included in
    • getRecordsBySeries

      public List<Record> getRecordsBySeries(String seriesName)
      Gets all records in the specified series.
      Parameters:
      seriesName - Series name
      Returns:
      A list containing all records that were selected in the specified series If there are no series with the specified name, the method returns an empty list.
    • fireEvent

      public void fireEvent()
      Specified by:
      fireEvent in class BaseEvent