public class PieChartLegendModifier extends PieChartModifierBase
SciPieChartSurface
and also can provide a data-source via setSourceSeries(IPieRenderableSeries)
method.services
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 |
PieChartLegendModifier(SciChartLegend legend,
PieSegmentsLegendAdapter legendAdapter,
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()
Called when segments collection drastically changed.
|
void |
onSegmentsCollectionChanged(com.scichart.core.observable.CollectionChangedEventArgs<IPieSegment> args)
Called when segments collection changes.
|
void |
onSelectedSegmentsCollectionChanged(com.scichart.core.observable.CollectionChangedEventArgs<IPieSegment> args)
Called when selected segments 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, getModifierSurface, getParentSurface, getPointRelativeTo, getRenderableSeries, onParentSurfaceResized, onPieRenderSurfaceRendered, onRenderableSeriesCollectionChanged, onRenderableSeriesDrasticallyChanged, onSelectedSeriesCollectionChanged
checkPointerCounter, getEventsGroupTag, getIsEnabled, getReceiveHandledEvents, getServices, isAttached, onGenericMotion, onIsEnabledChanged, onTouch, setEventsGroupTag, setIsEnabled, setReceiveHandledEvents
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEventsGroupTag, getIsEnabled, setIsEnabled
public PieChartLegendModifier(android.content.Context context)
PieChartLegendModifier
classcontext
- The context of the applicationpublic PieChartLegendModifier(SciChartLegend legend)
PieChartLegendModifier
classlegend
- The SciChartLegend
instance which should be used by this modifierpublic PieChartLegendModifier(SciChartLegend legend, boolean useAutoPlacement)
PieChartLegendModifier
classlegend
- The SciChartLegend
instance which should be used by this modifieruseAutoPlacement
- If true modifier will try to place legend inside chart, otherwise legend is already placed somewhere and shouldn't be movedpublic PieChartLegendModifier(SciChartLegend legend, PieSegmentsLegendAdapter legendAdapter, boolean useAutoPlacement)
PieChartLegendModifier
classlegend
- The SciChartLegend
instance which should be used by this modifierlegendAdapter
- The PieSegmentsLegendAdapter
instance which should be used by legenduseAutoPlacement
- If true modifier will try to place legend inside chart, otherwise legend is already placed somewhere and shouldn't be movedpublic 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 ChartModifierCore
themeProvider
- The IThemeProvider
instance which provides new theme for current instancepublic void attachTo(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()
onSegmentCollectionDrasticallyChanged
in interface ISciPieChartSurfaceChangeListener
onSegmentCollectionDrasticallyChanged
in class PieChartModifierBase
public void onSegmentsCollectionChanged(com.scichart.core.observable.CollectionChangedEventArgs<IPieSegment> args)
onSegmentsCollectionChanged
in interface ISciPieChartSurfaceChangeListener
onSegmentsCollectionChanged
in class PieChartModifierBase
public void onSelectedSegmentsCollectionChanged(com.scichart.core.observable.CollectionChangedEventArgs<IPieSegment> args)
onSelectedSegmentsCollectionChanged
in interface ISciPieChartSurfaceChangeListener
onSelectedSegmentsCollectionChanged
in class PieChartModifierBase
public void updateLegend()
protected boolean isSeriesValid(IPieRenderableSeries series)
SeriesInfo
series
- The renderable series to check