ChartSeries<T, D> class
abstract
This class holds the property of series.
Chart series has property to render the series if the property data source is empty it renders an empty chart. ChartSeries is the base class, it has the property to set the name, data source, border color and width to customize the series.
Provides options that are extended by the other sub classes such as name, point color mapper, data label mapper, animation duration and border-width and color for customize the appearance of the chart.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- RenderObjectWidget
- SlottedMultiChildRenderObjectWidget<
SeriesSlot, RenderObject> - ChartSeries
- Implementers
Constructors
-
ChartSeries({ValueKey<
String> ? key, List<T> ? dataSource, ChartValueMapper<T, D> ? xValueMapper, ChartValueMapper<T, Color> ? pointColorMapper, SortingOrder sortingOrder = SortingOrder.none, ChartValueMapper<T, dynamic> ? sortFieldValueMapper, ChartValueMapper<T, String> ? dataLabelMapper, String? name, bool enableTooltip = true, double animationDuration = 1500, Color? color, double borderWidth = 2.0, bool isVisibleInLegend = true, LegendIconType legendIconType = LegendIconType.seriesType, String? legendItemText, double opacity = 1.0, double animationDelay = 0, bool initialIsVisible = true, SelectionBehavior? selectionBehavior, List<int> ? initialSelectedDataIndexes, EmptyPointSettings emptyPointSettings = const EmptyPointSettings(), DataLabelSettings dataLabelSettings = const DataLabelSettings(), MarkerSettings markerSettings = const MarkerSettings(), ChartPointInteractionCallback? onPointTap, ChartPointInteractionCallback? onPointDoubleTap, ChartPointInteractionCallback? onPointLongPress}) -
Creating an argument constructor of ChartSeries class.
const
Properties
- animationDelay → double
-
Delay duration of the series animation.It takes a millisecond value as
input. By default, the series will get animated for the specified
duration. If animationDelay is specified, then the series will begin to
animate after the specified duration.
final
- animationDuration → double
-
Duration of the series animation. It takes millisecond value as input.
final
- borderWidth → double
-
Border width of the series.
final
- color → Color?
-
Color of the series.
final
-
dataLabelMapper
→ ChartValueMapper<
T, String> ? -
Field in the data source, which is considered as text for the data points.
final
- dataLabelSettings → DataLabelSettings
-
Customizes the data labels in a series. Data label is a text, which
displays the details about the data point.
final
-
dataSource
→ List<
T> ? -
Data required for rendering the series. If no data source is specified,
empty chart will be rendered without series.
final
- emptyPointSettings → EmptyPointSettings
-
Customizes the empty points, i.e. null data points in a series.
final
- enableTooltip → bool
-
Enables or disables the tooltip for this series. Tooltip will display more
details about data points when tapping the data point region.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialIsVisible → bool
-
Visibility of the series, which applies only during load time.
final
-
initialSelectedDataIndexes
→ List<
int> ? -
List of data indexes to initially be selected.
final
- isVisibleInLegend → bool
-
Toggles the visibility of the legend item of this specific series
in the legend.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- legendIconType → LegendIconType
-
Shape of the legend icon. Any shape in the LegendIconType can be applied
to this property. By default, icon will be rendered based
on the type of the series.
final
- legendItemText → String?
-
Text to be displayed in legend. By default, the series name will be
displayed in the legend. You can change this by
setting values to this property.
final
- markerSettings → MarkerSettings
-
Indication of data points.
final
- name → String?
-
Name of the series. The name will be displayed in legend item by default.
If name is not specified for the series, then the current series index
with ‘series’ text prefix will be considered as series name.
final
- onPointDoubleTap → ChartPointInteractionCallback?
-
Called when double tapped on the chart data point.
final
- onPointLongPress → ChartPointInteractionCallback?
-
Called when long pressed on the chart data point.
final
- onPointTap → ChartPointInteractionCallback?
-
Called when tapped on the chart data point.
final
- opacity → double
-
Opacity of the series. The value ranges from 0 to 1.
final
-
pointColorMapper
→ ChartValueMapper<
T, Color> ? -
Field in the data source, which is considered as fill color
for the data points.
final
-
positions
→ List<
ChartDataPointType> -
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectionBehavior → SelectionBehavior?
-
Customizes the data points or series on selection.
final
-
slots
→ Iterable<
SeriesSlot> -
Returns a list of all available slots.
no setteroverride
-
sortFieldValueMapper
→ ChartValueMapper<
T, dynamic> ? -
Field in the data source, which is considered for sorting the data points.
final
- sortingOrder → SortingOrder
-
The data points in the series can be sorted in ascending or descending
order. The data points will be rendered in the specified order
if it is set to none.
final
-
xValueMapper
→ ChartValueMapper<
T, D> ? -
Field in the data source, which is considered as x-value.
final
Methods
-
childForSlot(
SeriesSlot slot) → Widget? -
Returns the widget that is currently occupying the provided
slot
.override -
createElement(
) → SlottedRenderObjectElement< SeriesSlot, RenderObject> -
RenderObjectWidgets always inflate to a RenderObjectElement subclass.
inherited
-
createRenderer(
) → ChartSeriesRenderer< T, D> -
createRenderObject(
BuildContext context) → ChartSeriesRenderer< T, D> -
Creates an instance of the RenderObject class that this
RenderObjectWidget represents, using the configuration described by this
RenderObjectWidget.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
didUnmountRenderObject(
covariant RenderObject renderObject) → void -
A render object previously associated with this widget has been removed
from the tree. The given RenderObject will be of the same type as
returned by this object's createRenderObject.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
-
updateRenderObject(
BuildContext context, covariant ChartSeriesRenderer< T, D> renderObject) → void -
Copies the configuration described by this RenderObjectWidget to the
given RenderObject, which will be of the same type as returned by this
object's createRenderObject.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited