public class PieChartLegendModifier extends PieChartModifierBase
SciPieChartSurface
and also can provide a data-source via setSourceSeries(IPieRenderableSeries)
method.Constructor and Description |
---|
PieChartLegendModifier(android.content.Context context)
Creates a new instance of
PieChartLegendModifier class |
PieChartLegendModifier(SciChartLegend legend)
Creates a new instance of
PieChartLegendModifier class |
PieChartLegendModifier(SciChartLegend legend,
boolean useAutoPlacement)
Creates a new instance of
PieChartLegendModifier class |
Modifier and Type | Method and Description |
---|---|
void |
applyThemeProvider(IThemeProvider themeProvider)
Applies specified theme to current instance
|
void |
attachTo(com.scichart.core.IServiceContainer serviceContainer) |
void |
detach() |
protected boolean |
isSeriesValid(IPieRenderableSeries series)
When overridden in derived classes, indicates whether the series should be inspected in order to get
SeriesInfo |
void |
onSegmentCollectionDrasticallyChanged(IPieRenderableSeries series)
Called when parent
PieDonutRenderableSeriesBase.getSegmentsCollection() collection drastically changed. |
void |
onSegmentsCollectionChanged(com.scichart.core.observable.CollectionChangedEventArgs<IPieSegment> args)
Called when parent
PieDonutRenderableSeriesBase.getSegmentsCollection() collection changes. |
void |
onSelectedSegmentsCollectionChanged(com.scichart.core.observable.CollectionChangedEventArgs<IPieSegment> args)
Called when parent
PieDonutRenderableSeriesBase.getSelectedSegmentsCollection() collection changes. |
void |
setLegendPosition(int gravity,
int margin)
Sets the position of the current
PieChartLegendModifier instance. |
void |
setLegendPosition(int gravity,
int leftMargin,
int topMargin,
int rightMargin,
int bottomMargin)
Sets the position of the current
PieChartLegendModifier instance. |
void |
setOrientation(int orientation)
Sets the orientation of the legend
|
void |
setShowCheckboxes(boolean showCheckboxes)
Sets whether the legend should display checkboxes
|
void |
setShowLegend(boolean showLegend)
Sets whether the legend should be displayed
|
void |
setShowSeriesMarkers(boolean showSeriesMarkers)
Sets whether the legend should display series markers
|
void |
setSourceSeries(IPieRenderableSeries sourceSeries)
Sets the
SourceMode value for legend |
void |
updateLegend()
Refreshes content of the legend with up-to-date values
|
getContext, getEventsGroupTag, getIsEnabled, getModifierSurface, getParentSurface, getPointRelativeTo, getReceiveHandledEvents, getRenderableSeries, getServices, isAttached, onGenericMotion, onIsEnabledChanged, onParentPieSurfaceResized, onPieRenderableSeriesCollectionChanged, onPieRenderableSeriesDrasticallyChanged, onPieRenderSurfaceRendered, onSelectedPieSeriesCollectionChanged, onTouch, setIsEnabled, setReceiveHandledEvents
public PieChartLegendModifier(@NonNull android.content.Context context)
PieChartLegendModifier
classcontext
- The context of the applicationpublic PieChartLegendModifier(@NonNull SciChartLegend legend)
PieChartLegendModifier
classlegend
- The SciChartLegend
instance which should be used by this modifierpublic PieChartLegendModifier(@NonNull SciChartLegend legend, boolean useAutoPlacement)
PieChartLegendModifier
classlegend
- The SciChartLegend
instance which should be used by this modifierpublic void setLegendPosition(int gravity, int margin)
PieChartLegendModifier
instance.gravity
- The sciChartLegend
gravity for this modifier.margin
- The margin size for all sides (left, top, right, bottom).public void setLegendPosition(int gravity, int leftMargin, int topMargin, int rightMargin, int bottomMargin)
PieChartLegendModifier
instance.gravity
- The sciChartLegend
gravity for this modifier.leftMargin
- The left margin size.topMargin
- The top margin size.rightMargin
- The right margin size.bottomMargin
- The bottom margin size.public final void setOrientation(int orientation)
orientation
- The orientation of legendpublic final void setShowLegend(boolean showLegend)
showLegend
- The new showLegend valuepublic final void setShowCheckboxes(boolean showCheckboxes)
showCheckboxes
- The new showCheckboxes valuepublic final void setShowSeriesMarkers(boolean showSeriesMarkers)
showSeriesMarkers
- The new showSeriesMarkers valuepublic final void setSourceSeries(IPieRenderableSeries sourceSeries)
SourceMode
value for legendsourceSeries
- The new SourceMode
valuepublic void applyThemeProvider(IThemeProvider themeProvider)
applyThemeProvider
in interface IThemeable
applyThemeProvider
in class PieChartModifierBase
themeProvider
- The IThemeProvider
instance which provides new theme for current instancepublic void attachTo(@NonNull com.scichart.core.IServiceContainer serviceContainer)
attachTo
in interface com.scichart.core.framework.IAttachable
attachTo
in class PieChartModifierBase
public void detach()
detach
in interface com.scichart.core.framework.IAttachable
detach
in class PieChartModifierBase
public void onSegmentCollectionDrasticallyChanged(IPieRenderableSeries series)
PieDonutRenderableSeriesBase.getSegmentsCollection()
collection drastically changed.onSegmentCollectionDrasticallyChanged
in interface ISciPieChartSurfaceChangeListener
onSegmentCollectionDrasticallyChanged
in class PieChartModifierBase
series
- The associated IPieRenderableSeries
.public void onSegmentsCollectionChanged(com.scichart.core.observable.CollectionChangedEventArgs<IPieSegment> args)
PieDonutRenderableSeriesBase.getSegmentsCollection()
collection changes.onSegmentsCollectionChanged
in interface ISciPieChartSurfaceChangeListener
onSegmentsCollectionChanged
in class PieChartModifierBase
args
- The collection changed event args.public void onSelectedSegmentsCollectionChanged(com.scichart.core.observable.CollectionChangedEventArgs<IPieSegment> args)
PieDonutRenderableSeriesBase.getSelectedSegmentsCollection()
collection changes.onSelectedSegmentsCollectionChanged
in interface ISciPieChartSurfaceChangeListener
onSelectedSegmentsCollectionChanged
in class PieChartModifierBase
args
- The collection changed event args.public void updateLegend()
protected boolean isSeriesValid(IPieRenderableSeries series)
SeriesInfo
series
- The renderable series to check