ChartData<T extends IDataSet<Entry>> class

Implementers

Constructors

ChartData()
Default constructor.
ChartData.fromList(List<T> dataSets)
Constructor taking single or multiple DataSet objects.

Properties

dataSets List<T>
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
leftAxisMax double?
getter/setter pair
leftAxisMin double?
getter/setter pair
rightAxisMax double?
getter/setter pair
rightAxisMin double?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
xMax double
getter/setter pair
xMin double
getter/setter pair
yMax double
getter/setter pair
yMin double
getter/setter pair

Methods

addDataSet(T d) → void
Adds a DataSet dynamically.
addEntry(Entry e, int dataSetIndex) → void
Adds an Entry to the DataSet at the specified index. Entries are added to the end of the list.
addEntryByIndex(int index, Entry e, int dataSetIndex) → void
calcMinMax1() → void
Calc minimum and maximum values (both x and y) over all DataSets.
calcMinMax2(Entry e, AxisDependency axis) → void
Adjusts the current minimum and maximum values based on the provided Entry object.
calcMinMax3(T d) → void
Adjusts the minimum and maximum values based on the given DataSet.
calcMinMaxY(double fromX, double toX) → void
Calc minimum and maximum y-values over all DataSets. Tell DataSets to recalculate their min and max y-values, this is only needed for autoScaleMinMax.
clearValues() → void
Clears this data object from all DataSets and removes all Entries. Don't forget to invalidate the chart after this.
contains(T dataSet) bool
Checks if this data object contains the specified DataSet. Returns true if so, false if not.
getColors() List<Color?>?
Returns all colors used across all DataSet objects this object represents.
getDataSetByIndex(int index) → T?
getDataSetByLabel(String label, bool ignorecase) → T?
Returns the DataSet object with the given label. Search can be case sensitive or not. IMPORTANT: This method does calculations at runtime. Use with care in performance critical situations.
getDataSetCount() int
returns the number of LineDataSets this object contains
getDataSetForEntry(Entry e) → T?
Returns the DataSet that contains the provided Entry, or null, if no DataSet contains this Entry.
getDataSetIndexByLabel(List<T>? dataSets, String label, bool ignorecase) int
Retrieve the index of a DataSet with a specific label from the ChartData. Search can be case sensitive or not. IMPORTANT: This method does calculations at runtime, do not over-use in performance critical situations.
getDataSetLabels() List<String?>
Returns the labels of all DataSets as a string array.
getEntryCount() int
Returns the total entry count across all DataSet objects this data object contains.
getEntryForHighlight(Highlight? highlight) Entry?
Get the Entry for a corresponding highlight object
getFirstLeft(List<T> sets) → T?
Returns the first DataSet from the datasets-array that has it's dependency on the left axis. Returns null if no DataSet with left dependency could be found.
getFirstRight(List<T> sets) → T?
Returns the first DataSet from the datasets-array that has it's dependency on the right axis. Returns null if no DataSet with right dependency could be found.
getIndexOfDataSet(T dataSet) int
Returns the index of the provided DataSet in the DataSet array of this data object, or -1 if it does not exist.
getMaxEntryCountSet() → T?
Returns the DataSet object with the maximum number of entries or null if there are no DataSets.
getYMax1() double
Returns the greatest y-value the data object contains.
getYMax2(AxisDependency axis) double?
Returns the maximum y-value for the specified axis.
getYMin1() double
Returns the smallest y-value the data object contains.
getYMin2(AxisDependency axis) double?
Returns the minimum y-value for the specified axis.
isHighlightEnabled() bool
Returns true if highlighting of all underlying values is enabled, false if not.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyDataChanged() → void
Call this method to let the ChartData know that the underlying data has changed. Calling this performs all necessary recalculations needed when the contained data has changed.
removeDataSet1(T d) bool
Removes the given DataSet from this data object. Also recalculates all minimum and maximum values. Returns true if a DataSet was removed, false if no DataSet could be removed.
removeDataSet2(int index) bool
Removes the DataSet at the given index in the DataSet array from the data object. Also recalculates all minimum and maximum values. Returns true if a DataSet was removed, false if no DataSet could be removed.
removeEntry1(Entry e, int dataSetIndex) bool
Removes the given Entry object from the DataSet at the specified index.
removeEntry2(double xValue, int dataSetIndex) bool
Removes the Entry object closest to the given DataSet at the specified index. Returns true if an Entry was removed, false if no Entry was found that meets the specified requirements.
setDrawValues(bool enabled) → void
Enables / disables drawing values (value-text) for all DataSets this data object contains.
setHighlightEnabled(bool enabled) → void
Enables / disables highlighting values for all DataSets this data object contains. If set to true, this means that values can be highlighted programmatically or by touch gesture.
setValueFormatter(ValueFormatter f) → void
Sets a custom IValueFormatter for all DataSets this data object contains.
setValueTextColor(Color color) → void
Sets the color of the value-text (color in which the value-labels are drawn) for all DataSets this data object contains.
setValueTextColors(List<Color> colors) → void
Sets the same list of value-colors for all DataSets this data object contains.
setValueTextSize(double size) → void
Sets the size (in dp) of the value-text for all DataSets this data object contains.
setValueTypeface(TypeFace tf) → void
Sets the Typeface for all value-labels for all DataSets this data object contains.
toString() String
A string representation of this object.
inherited
updateEntryByIndex(int index, Entry e, int dataSetIndex) → void

Operators

operator ==(Object other) bool
The equality operator.
inherited