BarLineScatterCandleBubbleDataSet<T extends Entry> class
abstract
Base for the data sets of the charts with an x and a y axis (bar, line, scatter, candle and bubble). Adds the highlight color those charts share.
T is the entry type this set holds.
- Inheritance
-
- Object
- BaseDataSet<
T> - DataSet<
T> - BarLineScatterCandleBubbleDataSet
- Implemented types
- Implementers
Constructors
-
BarLineScatterCandleBubbleDataSet(List<
T> entries, String label) -
Creates a set holding
entriesnamedlabel.
Properties
- axisDependency ↔ AxisDependency
-
The y axis this data set is plotted against. Default AxisDependency.LEFT.
getter/setter pairinherited
- color ↔ Color
-
The first entry color, or black when colors is empty. Assigning replaces the whole colors list with this one
color.
getter/setter pairinherited
-
colors
↔ List<
Color> -
Colors used to draw the entries, reused from the start when there are more entries than colors.
getter/setter pairinherited
-
entries
↔ List<
T> -
The entries of this set. The list is kept by reference, so the caller can keep changing it; it must be growable
for addEntry and friends to work. Assigning recomputes the cached ranges; after changing the list in place
call notifyDataSetChanged yourself.
getter/setter pairinherited
- entryCount → int
-
Number of entries in this data set.
no setterinherited
- form ↔ LegendForm
-
Shape of this set's legend entry. LegendForm.DEFAULT uses the legend's form.
getter/setter pairinherited
- formLineDashEffect ↔ DashPathEffect?
-
Dash effect for this set's legend form when the form is a line. Null uses the legend's dash effect.
getter/setter pairinherited
- formLineWidth ↔ double
-
Line width of this set's legend form in dp when the form is a line. NaN uses the legend's width.
getter/setter pairinherited
- formSize ↔ double
-
Size of this set's legend form in dp. NaN (the default) uses the legend's form size.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasNonFiniteY ↔ bool
-
True when any entry's y is not a finite number, so a renderer knows the line may need a gap. Set while the
entries are walked, and only cleared by a full calcMinMax; removing the offending entry without one leaves
it true, which costs a check rather than a wrong drawing.
getter/setter pairinherited
- highlightColor ↔ Color
-
Color of the highlight indicator drawn at a selected entry. Default a light orange, rgb(255, 187, 115).
getter/setter pairoverride-getter
- iconsOffset ↔ MPPointF
-
Offset in dp applied to every entry icon. Assigning copies x and y into the existing point.
getter/setter pairinherited
- isDrawIconsEnabled ↔ bool
-
True to draw the entry icons. Default true. Not drawn when more entries are visible than the chart's
maxVisibleCountallows.getter/setter pairinherited - isDrawValuesEnabled ↔ bool
-
True to draw the value labels at the entries. Default true. Not drawn when more entries are visible
than the chart's
maxVisibleCountallows.getter/setter pairinherited - isHighlightEnabled ↔ bool
-
True if entries of this data set can be highlighted by touch or
chart.highlightValue(...). Default true.getter/setter pairinherited - isVisible ↔ bool
-
True if this data set is drawn. Default true. Hidden data sets still count for the axis ranges.
getter/setter pairinherited
- label ↔ String
-
Name shown in the legend for this data set.
getter/setter pairinherited
- needsFormatter → bool
-
True while no custom valueFormatter is assigned, so the chart may apply its own default formatter.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- valueFormatter ↔ IValueFormatter
-
Formatter for the value labels. Returns Utils.defaultValueFormatter until a custom one is assigned.
getter/setter pairinherited
- valueTextColor ↔ Color
-
The first value label color, or black when the list is empty. Assigning replaces the whole valueTextColors
list with this one color.
getter/setter pairinherited
-
valueTextColors
↔ List<
Color> -
Colors used to draw the value labels, reused from the start like colors. Default black.
getter/setter pairinherited
- valueTextSize ↔ double
-
Text size of the value labels in dp. Default 7.
getter/setter pairinherited
- valueTypeface ↔ Typeface?
-
Typeface of the value labels, null for the default.
getter/setter pairinherited
- xMax ↔ double
-
Largest x over the entries, or -
Float.MAX_VALUEwhen empty. Refreshed by calcMinMax.getter/setter pairinherited - xMin ↔ double
-
Smallest x over the entries, or
Float.MAX_VALUEwhen empty. Refreshed by calcMinMax.getter/setter pairinherited - yMax ↔ double
-
Largest y over the entries, or -
Float.MAX_VALUEwhen empty. Refreshed by calcMinMax and calcMinMaxY.getter/setter pairinherited - yMin ↔ double
-
Smallest y over the entries, or
Float.MAX_VALUEwhen empty. Refreshed by calcMinMax and calcMinMaxY.getter/setter pairinherited
Methods
-
addColor(
Color color) → void -
Appends one color to colors.
inherited
-
addEntry(
T e) → bool -
Appends
eto the end without checking the x order; use addEntryOrdered to keep the entries sorted. The cached ranges are widened to includee.inherited -
addEntryOrdered(
T e) → void -
Adds
eso that the entries stay sorted by x: it is appended when its x is not smaller than the last entry's x, otherwise inserted before the first entry with a larger x. The cached ranges are widened to includeewithout a full recalculation.inherited -
calcMinMax(
) → void -
Recomputes xMin, xMax, yMin and yMax from all entries.
inherited
-
calcMinMaxForEntry(
T e) → void -
Widens the cached x and y ranges to include
e.inherited -
calcMinMaxX(
T e) → void -
Widens xMin and xMax to include the x of
e.inherited -
calcMinMaxY(
double fromX, double toX) → void -
Recomputes only yMin and yMax from the entries between
fromXandtoX, used by charts that auto scale the y axis to the visible x range. The x range is left untouched. With no entries in the range the y range is reset to its empty values.inherited -
calcMinMaxYForEntry(
T e) → void -
Widens yMin and yMax to include the y of
e; a NaN or infinite y is left out.inherited -
clear(
) → void -
Removes all entries and resets the cached ranges.
inherited
-
contains(
T entry) → bool -
Returns true if
entryis one of this set's entries, compared with==(identity for Entry).inherited -
copy(
) → DataSet< T> -
Returns a deep copy: the entries are copied with Entry.copy, the styling as in BaseDataSet.copyTo.
inherited
-
copyTo(
covariant BarLineScatterCandleBubbleDataSet< Entry> dataSet) → void -
Copies the styling from this set into
dataSet; entries are not copied here.override -
getColor(
int index) → Color -
Returns the color for the entry at
index, wrapping around colors when there are fewer colors. Black when colors is empty.inherited -
getEntriesForXValue(
double xValue) → List< T> -
Returns all entries whose x equals
xValueexactly, in list order, found by binary search over the x sorted entries. Empty when there is no exact match.inherited -
getEntryForIndex(
int index) → T -
Returns the entry at
index.inherited -
getEntryForXValue(
double xValue, [double closestToY = double.nan, Rounding rounding = Rounding.CLOSEST]) → T? -
Returns the entry at the index found by getEntryIndex with the same arguments, or null when the set
is empty. The x need not match exactly; see getEntryIndex.
inherited
-
getEntryIndex(
double xValue, [double closestToY = double.nan, Rounding rounding = Rounding.CLOSEST]) → int -
Finds the index of the entry nearest to
xValueby binary search; the entries must be sorted by x. When two entries are equally close, the one with the larger x is taken.inherited -
getEntryIndexOf(
Entry e) → int -
Returns the index of
ein the entries, or -1 when the set does not hold it. Matching is by identity, so an entry with the same x and y asebut built separately is not a match.inherited -
getIndexInEntries(
int xIndex) → int -
Finds the entry whose x equals
xIndexexactly by scanning all entries.inherited -
getValueTextColor(
int index) → Color -
Returns the value label color for the entry at
index, wrapping around valueTextColors. Black when the list is empty.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyDataSetChanged(
) → void -
Recomputes the cached x and y ranges from the entries. Call after changing entries in place.
inherited
-
removeEntry(
T e) → bool -
Removes
e, matched with==(identity for Entry), and recomputes the ranges if it was found.inherited -
removeEntryByIndex(
int index) → bool -
Removes the entry at
index.inherited -
removeEntryByXValue(
double xValue) → bool -
Removes the entry whose x is closest to
xValue, which need not be an exact match.inherited -
removeFirst(
) → bool -
Removes the first entry. Returns false and does nothing when the set is empty.
inherited
-
removeLast(
) → bool -
Removes the last entry. Returns false and does nothing when the set is empty.
inherited
-
resetColors(
) → void -
Removes all colors. Add at least one color before the set is drawn; until then getColor returns black.
inherited
-
setColor(
Color color, int alpha) → void -
Replaces colors with this one color after applying
alpha.inherited -
setColors(
List< Color> colors, [int? alpha]) → void -
Replaces
colorswith the given colors (Kotlin'ssetColors(vararg colors: Int)), or, withalpha, with the given colors after applyingalpha(0 transparent to 255 opaque) to each of them, ignoring their own alpha (Kotlin'ssetColors(colors: List<Int>, alpha: Int)).inherited -
toSimpleString(
) → String -
Returns the label and the entry count in one line, without listing the entries.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited