Package com.jbstrap.core.event
Class ChartLassoEvent
java.lang.Object
com.jbstrap.core.event.BaseEvent
com.jbstrap.core.event.ChartLassoEvent
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
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected ChartLassoEvent
addRecords
(Series series, List<Record> records) Adds a selected record to the event.void
Gets all selected records.Gets the chart canvas component that triggered the event.BaseChart<?>
getChart()
Gets the chart that triggered the event.getRecordsBySeries
(String seriesName) Gets all records in the specified series.getSeriesByName
(String seriesName) Gets a series instance based on its name.Gets the name of the series the data points of which were selected by the user.protected ChartLassoEvent
setCanvas
(ChartCanvas canvas) Sets the chart component that triggered the event.protected ChartLassoEvent
Methods inherited from class com.jbstrap.core.event.BaseEvent
getClient, getComponent, getEventId, getEventType, getSenderId
-
Constructor Details
-
ChartLassoEvent
public ChartLassoEvent()
-
-
Method Details
-
setChart
- Parameters:
chart
- The chart instance that triggered the event- Returns:
- Chart lasso event
-
addRecords
Adds a selected record to the event.- Parameters:
series
- The series instance containing the recordrecords
- The selected record instance- Returns:
- Chart lasso event
-
setCanvas
Sets the chart component that triggered the event.- Parameters:
canvas
- The chart canvas component that triggered the event- Returns:
- Chart lasso event
-
getCanvas
Gets the chart canvas component that triggered the event.- Returns:
- The chart canvas component that triggered the event
-
getChart
Gets the chart that triggered the event.- Returns:
- The chart component that triggered the event
-
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
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
Gets all selected records.- Returns:
- A list containing all records selected by the user, irrespectively of which series they are included in
-
getRecordsBySeries
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()
-