AbstractSingleIndicatorSeries class abstract
Base class of indicator series with a single indicator.
Handles reusing result of previous indicator of the series. The decision to whether it can use the result of the old series calculated values is made inside didUpdate method.
- Inheritance
-
- Object
- Series
- DataSeries<
Tick> - AbstractSingleIndicatorSeries
- Implementers
Constructors
-
AbstractSingleIndicatorSeries(Indicator<
Tick> inputIndicator, String id, {IndicatorOptions? options, DataSeriesStyle? style, int offset = 0, HorizontalBarrierStyle? lastTickIndicatorStyle, String? axisGroup}) - Initializes
Properties
- axisGroup → String?
-
Which axis this series scales against.
finalinherited
-
entries
↔ List<
Tick> ? -
The list of this class that will be painted on the canvas.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id ↔ String
-
The ID of this ChartData.
getter/setter pairinherited
-
input
→ List<
Tick> -
Series input list.
finalinherited
-
inputIndicator
→ Indicator<
Tick> -
Input indicator to calculate this indicator value on.
final
- lastTickIndicatorStyle → HorizontalBarrierStyle?
-
Style of a last tick indicator.
nullif indicator is absent.finalinherited - maxValue → double
-
Max quote in a frame.
no setterinherited
- maxValueInFrame ↔ double?
-
Maximum value of this series in a visible range of the chart.
getter/setter pairinherited
- minValue → double
-
Min quote in a frame.
no setterinherited
- minValueInFrame ↔ double?
-
Minimum value of this series in a visible range of the chart.
getter/setter pairinherited
- offset → int
-
The offset of this indicator.
final
- options → IndicatorOptions?
-
Indicator options
final
-
prevLastEntry
↔ IndexedEntry<
Tick> ? -
A reference to the last element of the previous version of this
DataSeries.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
seriesPainter
↔ SeriesPainter<
Series> ? -
Responsible for painting a frame of this series on the canvas.
getter/setter pairinherited
- style → ChartPaintingStyle?
-
The painting style of this Series.
finalinherited
-
visibleEntries
→ VisibleEntries<
Tick> -
Series visible entries
no setterinherited
Methods
-
createPainter(
) → SeriesPainter< Series> ? -
Is called whenever series is created to create its seriesPainter
as well.
inherited
-
createVirtualTick(
int epoch, double quote) → Tick -
Creates a virtual tick for crosshair display when cursor is outside data range.
Each series type should implement this to return the appropriate tick type.
override
-
didUpdate(
ChartData? oldData) → bool -
Will be called by the chart when it was updated.
inherited
-
fillEntriesFromInput(
covariant AbstractSingleIndicatorSeries oldSeries) → void -
Fills the entries that are about to be painted based on input and
oldSeriesoverride -
getCrosshairDetailsBoxHeight(
) → double -
Returns the height of the crosshair details box for this series type.
Each series type should implement this to return the appropriate height.
override
-
getCrosshairDotPainter(
ChartTheme theme) → CrosshairDotPainter -
Returns a CrosshairDotPainter for painting a dot at the crosshair position.
Each series type should implement this to return the appropriate dot painter.
override
-
getCrosshairHighlightPainter(
Tick crosshairTick, double quoteToY(double p1), double xCenter, int granularity, double xFromEpoch(int p1), ChartTheme theme) → CrosshairHighlightPainter -
Returns a CrosshairHighlightPainter for highlighting the element at the crosshair position.
Each series type should implement this to return the appropriate highlight painter.
override
-
getCrossHairInfo(
Tick crossHairTick, int pipSize, ChartTheme theme, CrosshairVariant crosshairVariant) → Widget -
Each sub-class should implement and return appropriate cross-hair text
based on its own requirements.
override
-
getEpochOf(
Tick t, int index) → int -
Gets the real epoch for the given
t.override -
getMaxEpoch(
) → int? -
Maximum epoch of this ChartData on the chart's X-Axis.
inherited
-
getMinEpoch(
) → int? -
Minimum epoch of this ChartData on the chart's X-Axis.
inherited
-
getVisibleEntries(
int startIndex, int endIndex) → VisibleEntries< Tick> -
Creates visible entries based on
startIndexandendIndex.inherited -
initialize(
) → void -
Initializes entries from the input.
override
-
initializeIndicator(
) → CachedIndicator< Tick> -
Initializes the
_resultIndicator. -
isOldDataAvailable(
covariant AbstractSingleIndicatorSeries? oldSeries) → bool -
Checks whether the old data of the series is available to use
override
-
maxValueOf(
Tick t) → double -
Maximum value in
t.override -
minValueOf(
Tick t) → double -
Minimum value in
t.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onTap(
Offset localPosition) → bool -
Called when this series' pane receives a tap at
localPosition, in the same coordinate space as paint'ssize/canvas. Override to make a drawn region (e.g. a label) interactive. Returnstrueif the tap was handled by this series.inherited -
onUpdate(
int leftEpoch, int rightEpoch) → void -
Updates visible entries for this Series.
inherited
-
paint(
Canvas canvas, Size size, EpochToX epochToX, QuoteToY quoteToY, AnimationInfo animationInfo, ChartConfig chartConfig, ChartTheme theme, ChartScaleModel chartScaleModel) → void -
Paints seriesPainter's data on the
canvas.inherited -
recalculateMinMax(
) → List< double> -
Gets min and max quotes after updating visibleEntries as an array with
two elements
min, max.inherited -
resetLastEntryAnimation(
) → void -
Use this to reset last tick in entries animation by setting
prevLastEntry to
null.inherited -
shouldRepaint(
ChartData? oldDelegate) → bool -
Checks if this ChartData needs to repaint with the chart widget's
new frame.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
int leftEpoch, int rightEpoch) → void -
Updates visible entries for this Series.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited