@DomEvent(value="chart-drilldown") public class DrilldownEvent extends ComponentEvent<Chart> implements HasItem
source
Constructor and Description |
---|
DrilldownEvent(Chart source,
boolean fromClient,
String drilldown,
String category,
Double x,
Double y,
int pointIndex,
String pointId,
int seriesIndex)
Construct a ChartDrilldownEvent
|
Modifier and Type | Method and Description |
---|---|
String |
getCategory() |
String |
getDrilldown()
Gets the name of the drilldown
|
String |
getItemId()
The ID of the series item that is associated with the event.
|
int |
getItemIndex()
Returns the index of the series item, that is associated with this event,
in
HasSeries.getSeries() . |
int |
getSeriesItemIndex()
Returns the index of the series
|
Double |
getxValue() |
Double |
getyValue() |
getSource, isFromClient, unregisterListener
toString
public DrilldownEvent(Chart source, boolean fromClient, @EventData(value="event.detail.originalEvent.point.drilldown") String drilldown, @EventData(value="event.detail.originalEvent.point.category") String category, @EventData(value="event.detail.originalEvent.point.x") Double x, @EventData(value="event.detail.originalEvent.point.y") Double y, @EventData(value="event.detail.originalEvent.point.index") int pointIndex, @EventData(value="event.detail.originalEvent.point.id") String pointId, @EventData(value="event.detail.originalEvent.point.series.index") int seriesIndex)
source
- public String getDrilldown()
public Double getxValue()
public Double getyValue()
public String getCategory()
getCategory
in interface HasItem
public int getSeriesItemIndex()
HasSeries
getSeriesItemIndex
in interface HasSeries
public int getItemIndex()
HasItem
HasSeries.getSeries()
. Can be used to identify the item within the
series.
Example for ListSeries
:
int itemIndex = event.getItemIndex(); ListSeries series = (ListSeries) event.getSeries(); Number datum = series.getData()[itemIndex];
getItemIndex
in interface HasItem
HasItem.getItem()
,
HasItem.getItemId()
public String getItemId()
HasItem
Example for TreeSeries
:
String id = this.getItemId(); TreeSeries series = (TreeSeries) this.getSeries(); Optional<TreeSeriesItem> treeItem = series.getData().stream() .filter(item -> item.getId().equals(id)).findFirst();
Only AbstractSeriesItem
supports setting an ID. For other types
of series items this property will always return null. For
AbstractSeriesItem
the ID is optional. Unless the developer has
explicitly set an ID for the item associated with the event, this
property will be null. See HasItem.getItem()
or HasItem.getItemIndex()
for alternatives.
getItemId
in interface HasItem
HasItem.getItem()
,
HasItem.getItemIndex()
Copyright © 2025. All rights reserved.