BarLineChartBase<T extends BarLineScatterCandleBubbleData<IBarLineScatterCandleBubbleDataSet<Entry> > > class
abstract
Base class of the charts with an x axis and two y axes: LineChart, BarChart, ScatterChart,
CandleStickChart, BubbleChart and CombinedChart. It adds the axes, zooming, dragging and the
viewport functions, and implements BarLineScatterCandleBubbleDataProvider for the renderers.
T is the BarLineScatterCandleBubbleData type this chart displays, fixed by each subclass.
- Inheritance
- Implemented types
- Implementers
Constructors
Properties
-
afterDrawListeners
→ List<
void Function()> -
Called at the end of every onDraw, in list order: after the markers, or after the empty state.
finalinherited
- animator ↔ ChartAnimator
-
Runs the animations: the x and y phases of animateX, animateY and animateXY, and the value animations.
getter/setter pairinherited
- axisLeft ↔ YAxis
-
The left y axis.
getter/setter pair
- axisRight ↔ YAxis
-
The right y axis.
getter/setter pair
- borderColor ↔ Color
-
Color of the border drawn while isDrawBordersEnabled is true.
getter/setter pair
- borderPaint ↔ ChartPaint
-
Paint used for the border around the content area.
getter/setter pair
- borderWidth ↔ double
-
Width in dp of the border drawn while isDrawBordersEnabled is true. Default 1.
getter/setter pair
- center → MPPointF
-
Center of the whole chart in pixels, ignoring offsets. See centerOffsets for the content center.
no setterinherited
- centerOffsets → MPPointF
-
Center of the content rectangle in pixels, as a fresh MPPointF.
no setterinherited
- centerOfView → MPPointF
-
Center of the whole chart view in pixels, as a fresh MPPointF.
no setterinherited
-
chartTouchListener
↔ ChartTouchListener<
Chart< ChartData< >IDataSet< >Entry> > -
Handles touch events for this chart. Replace it to customize gestures; isTouchEnabled must stay true.
getter/setter pairinherited
- contentRect → MutableRect
-
Rectangle in pixels in which the data is drawn, the view minus axis, legend and extra offsets.
no setterinherited
- data ↔ T?
-
The data this chart displays, or null when nothing has been set.
getter/setter pairinherited
- defaultValueFormatter → IValueFormatter
-
Formatter the chart computed from its data, used by data sets that have no formatter of their own.
no setterinherited
- defaultValueFormatterInternal → DefaultValueFormatter
-
Formatter used for data sets without their own. Its digit count follows the y range of the data.
finalinherited
- description ↔ Description
-
The description text drawn in the bottom right corner by default.
getter/setter pairinherited
- descriptionPaint ↔ ChartPaint
-
Paint used for the description text.
getter/setter pairinherited
- dragDecelerationFrictionCoef ↔ double
-
How slowly a deceleration scroll loses speed, between 0 (stops at once) and 0.999.
Values outside that range are clamped. Default 0.9.
getter/setter pairinherited
- dragOffsetX ↔ double
-
Extra distance in dp the content may be dragged past its left and right bounds. Default 0.
getter/setter pair
- dragOffsetY ↔ double
-
Extra distance in dp the content may be dragged past its top and bottom bounds. Default 0.
getter/setter pair
- extraBottomOffset ↔ double
-
Extra space in dp added below the content area on top of the calculated offsets.
getter/setter pairinherited
- extraLeftOffset ↔ double
-
Extra space in dp added left of the content area on top of the calculated offsets.
getter/setter pairinherited
- extraRightOffset ↔ double
-
Extra space in dp added right of the content area on top of the calculated offsets.
getter/setter pairinherited
- extraTopOffset ↔ double
-
Extra space in dp added above the content area on top of the calculated offsets.
getter/setter pairinherited
- fitScreenMatrixBuffer → Matrix
-
Scratch matrix reused by fitScreen.
final
-
gestureListeners
→ List<
OnChartGestureListener> -
Additional gesture listeners, notified after onChartGestureListener in list order.
finalinherited
- gridBackgroundColor ↔ Color
-
Fill color of the content area, used while isDrawGridBackgroundEnabled is true.
getter/setter pair
- gridBackgroundPaint ↔ ChartPaint
-
Paint used for the grid background, filled light grey by default.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasNoDragOffset → bool
-
True when neither dragOffsetX nor dragOffsetY is above 0.
no setter
- height ↔ double
-
Height of the chart in logical pixels,
View.getHeight(). Set by onSizeChanged.getter/setter pairinherited - highestVisibleX → double
-
Largest x value currently visible in the content rectangle, at most the axis maximum.
no setteroverride
-
highlighted
↔ List<
Highlight> -
The values currently highlighted. Empty, never null, when nothing is highlighted.
getter/setter pairinherited
- highlighter ↔ IHighlighter
-
Turns a touch position into the Highlight of the nearest value.
getter/setter pairinherited
- host ↔ ChartHost?
-
What shows this chart on screen and receives its redraw, post and scroll requests, or null. The widget layer's
render object assigns itself here while it is attached.
getter/setter pairinherited
- infoPaint ↔ ChartPaint
-
Paint used for the no-data text.
getter/setter pairinherited
- isAnimating → bool
-
True while any animation runs: animateX, animateY, animateXY, a spin, animateValue or animateDataChange.
no setterinherited
- isAnyAxisInverted → bool
-
True when the left or the right y axis is inverted.
no setter
- isAutoScaleMinMaxEnabled ↔ bool
-
Whether the y axes are recalculated on every draw from the entries currently in view.
getter/setter pair
- isChartTouchListenerInitialized → bool
-
Whether chartTouchListener has been assigned, Kotlin's
::chartTouchListener.isInitialized.no setterinherited - isClipDataToContentEnabled ↔ bool
-
Whether data and highlights are clipped to the content area. Turn it off when thick lines or
large shapes inside the content get cut at its edges.
getter/setter pair
- isClipValuesToContentEnabled ↔ bool
-
Whether value labels are clipped to the content area instead of bleeding outside it.
getter/setter pair
- isDecimationEnabled ↔ bool
-
Whether entries that share a pixel column may be dropped while drawing. Off by default, so a chart draws every
entry you gave it. Line circles that another circle would cover are always skipped, with or without this.
getter/setter pairoverride-getter
- isDoubleTapToZoomEnabled ↔ bool
-
Whether a double tap zooms in.
getter/setter pair
- isDragDecelerationEnabled ↔ bool
-
Whether the chart keeps scrolling after the finger is lifted.
getter/setter pairinherited
- isDragEnabled ↔ bool
-
True when dragging is enabled on at least one axis. Setting it sets both isDragXEnabled and
isDragYEnabled. Dragging does not affect scaling.
getter/setter pair
- isDragXEnabled ↔ bool
-
Whether the chart can be dragged horizontally.
getter/setter pair
- isDragYEnabled ↔ bool
-
Whether the chart can be dragged vertically.
getter/setter pair
- isDrawBordersEnabled ↔ bool
-
Whether a border is drawn around the content area. With it on, the axis lines are redundant.
getter/setter pair
- isDrawGridBackgroundEnabled ↔ bool
-
Whether the content area is filled with gridBackgroundPaint.
getter/setter pair
- isDrawMarkersEnabled ↔ bool
-
Whether the marker is drawn at highlighted values.
getter/setter pairinherited
- isEmpty → bool
-
True when there is no data or the data holds no entries.
no setterinherited
- isFullyZoomedOut → bool
-
True when both zoom factors are at their minimum.
no setter
- isHighlightPerDragEnabled ↔ bool
-
Whether dragging highlights values while the chart is fully zoomed out and cannot be panned.
getter/setter pair
- isHighlightPerTapEnabled ↔ bool
-
Whether a tap highlights the nearest value. Values can still be highlighted by drag or in code.
getter/setter pairinherited
- isKeepPositionOnRotation ↔ bool
-
Whether the top left corner stays at the same values when the view is resized, such as on rotation.
getter/setter pair
- isLoading ↔ bool
-
Whether the data is on its way. While true and the chart has nothing to draw, the empty state shows
loadingText and its icon pulses. Data that arrives is drawn as usual, so this can stay true until then.
getter/setter pairinherited
- isLogEnabled ↔ bool
-
Prints chart internals with
debugPrintwhile true. Slows down drawing, so keep it off in production.getter/setter pairinherited - isNoDataIconEnabled ↔ bool
-
Whether the empty state draws an icon above its text: noDataIcon, or a small outline of this chart type.
getter/setter pairinherited
- isPinchZoomEnabled ↔ bool
-
Whether a pinch scales both axes together. When false, x and y can be scaled separately.
getter/setter pair
- isRendererInitialized → bool
-
Whether renderer has been assigned, Kotlin's
::renderer.isInitialized.no setterinherited - isScaleEnabled ↔ bool
-
True when scaling by gesture is enabled on at least one axis. Setting it sets both isScaleXEnabled
and isScaleYEnabled. Scaling does not affect dragging.
getter/setter pair
- isScaleXEnabled ↔ bool
-
Whether the chart can be scaled horizontally by gesture.
getter/setter pair
- isScaleYEnabled ↔ bool
-
Whether the chart can be scaled vertically by gesture.
getter/setter pair
- isTouchEnabled ↔ bool
-
Whether the chart reacts to touch at all. False disables tapping, dragging, scaling and rotating.
getter/setter pairinherited
- isUnbindEnabled ↔ bool
-
Kept for API parity; it has no effect. On Android it releases the background drawable and the child views when
the chart leaves the window; a Flutter chart has neither.
getter/setter pairinherited
-
jobs
→ List<
void Function()> -
Viewport jobs waiting for the chart to get a size. They run once in onSizeChanged.
finalinherited
- leftAxisTransformer ↔ Transformer
-
Converts values that depend on axisLeft to pixels and back.
getter/setter pair
- legend ↔ Legend
-
The legend component. It is filled from the data sets unless a custom legend is set on it.
getter/setter pairinherited
- legendLabelPaint ↔ ChartPaint
-
Paint used for legend labels.
getter/setter pairinherited
- legendRenderer ↔ LegendRenderer
-
Draws the legend.
getter/setter pairinherited
- loadingText ↔ String
-
Text of the empty state while isLoading is true.
getter/setter pairinherited
- lowestVisibleX → double
-
Smallest x value currently visible in the content rectangle, at least the axis minimum.
no setteroverride
- marker ↔ IMarker?
-
Marker drawn at each highlighted value, or null for none.
A MarkerView or MarkerImage is attached to this chart when set.
getter/setter pairinherited
- maxHighlightDistance ↔ double
-
Farthest distance in dp a touch may be from a value and still highlight it. Default 500.
getter/setter pairinherited
- maxVisibleCount ↔ int
-
Value labels of a data set are only drawn while at most this many of its entries are inside the visible
x range, so zooming in brings them back. Default 100.
getter/setter pairoverride-getter
- minOffset ↔ double
-
Smallest space in dp between the view edge and the content area on every side. Default 15.
getter/setter pair
- noDataIcon ↔ ChartDrawable?
-
Icon drawn above the empty state text instead of the outline of this chart type, or null for the outline.
getter/setter pairinherited
- noDataIconColor ↔ Color
-
Color of the chart type outline in the empty state. Default a faint slate that reads on light and dark backgrounds.
getter/setter pairinherited
- noDataText ↔ String
-
Text of the empty state, drawn while the chart has no data or data without entries. An empty string draws
only the icon.
getter/setter pairinherited
- noDataTextAlignment ↔ PaintAlign
-
Horizontal alignment of the empty state: at the left edge, in the center or at the right edge of the chart.
getter/setter pairinherited
- noDataTextColor ↔ Color
-
Color of noDataText and loadingText.
getter/setter pairinherited
- noDataTextSize ↔ double
-
Size of noDataText and loadingText in dp. Default 13.
getter/setter pairinherited
- noDataTextTypeface ↔ Typeface
-
Typeface of noDataText and loadingText; null sets the default. Default sans serif medium.
getter/setter pairinherited
- onChartGestureListener ↔ OnChartGestureListener?
-
Single listener told about gestures such as tap, double tap, drag, scale and fling.
getter/setter pairinherited
- onChartValueSelectedListener ↔ OnChartValueSelectedListener?
-
Single listener told when a value is selected or the selection is cleared.
getter/setter pairinherited
- posForGetHighestVisibleX → MPPointD
-
Scratch point reused by highestVisibleX.
final
- posForGetLowestVisibleX → MPPointD
-
Scratch point reused by lowestVisibleX.
final
- renderer ↔ DataRenderer
-
Draws the data. Each chart type installs its own renderer; replace it for custom drawing.
getter/setter pairinherited
- rendererLeftYAxis ↔ YAxisRenderer
-
Draws axisLeft.
getter/setter pair
- rendererRightYAxis ↔ YAxisRenderer
-
Draws axisRight.
getter/setter pair
- rendererXAxis ↔ XAxisRenderer
-
Draws the xAxis.
getter/setter pair
- rightAxisTransformer ↔ Transformer
-
Converts values that depend on axisRight to pixels and back.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showsEmptyState → bool
-
Whether the chart has no data or no entries and draws its empty state instead of the data.
no setterinherited
-
valueSelectedListeners
→ List<
OnChartValueSelectedListener> -
Additional listeners, notified after onChartValueSelectedListener in list order.
Meant for observers that must not replace the app's own listener, such as a widget's chart controller.
finalinherited
- viewPortHandler ↔ ViewPortHandler
-
Holds the chart size, the content rectangle and the zoom and drag matrix.
getter/setter pairinherited
- visibleXRange → double
-
Span of x values currently visible in the content area.
no setter
- width ↔ double
-
Width of the chart in logical pixels,
View.getWidth(). Set by onSizeChanged.getter/setter pairinherited - xAxis ↔ XAxis
-
The x axis component: its labels, range, grid lines and position.
getter/setter pairinherited
- xChartMax → double
-
Largest x value of the x axis, independent of zoom and drag.
no setterinherited
- xChartMin → double
-
Smallest x value of the x axis, independent of zoom and drag.
no setterinherited
- xRange → double
-
Difference between xChartMax and xChartMin.
no setterinherited
- yChartMax → double
-
Larger of the two y axis maximums.
no setteroverride
- yChartMin → double
-
Smaller of the two y axis minimums.
no setteroverride
- yMax → double
-
Largest y value across all data sets, or 0 without data.
no setterinherited
- yMin → double
-
Smallest y value across all data sets, or 0 without data.
no setterinherited
- zoomMatrixBuffer → Matrix
-
Scratch matrix reused by the zoom functions.
final
- zoomX → double
-
Current horizontal zoom factor of the viewport, 1 when fully zoomed out. Kotlin names it so because a View's
scaleXis its own transform.no setter - zoomY → double
-
Current vertical zoom factor of the viewport, 1 when fully zoomed out.
no setter
Methods
-
addViewportJob(
void job()) → void -
Runs a viewport job once the chart has a size: posted right away when it already has one, otherwise stored
in jobs until onSizeChanged. The zoom and move functions use this, passing a job's
run. At most 64 jobs wait, because only the last position matters and a chart that never gets a size would otherwise collect them forever.inherited -
animateDataChange(
T newData, int durationMillis, {EasingFunction easing = Easing.Linear, void onEnd() = _noop}) → void -
Sets
newDataand animates every entry from the value it replaces to its own value. Entries are paired by data set index and entry index; entries past the old end grow from 0, entries past the new end are gone at once. Stacked bars animate each stack value, candles open, high, low and close, bubbles their size and pie slices their value. The axis ranges follow on every frame and highlights stay on their x value.inherited -
animateValue(
Entry entry, double toY, int durationMillis, {EasingFunction easing = Easing.Linear, void onEnd() = _noop}) → void -
Animates the y value of one entry to
toY. The axis ranges follow the value on every frame. Works for line, bar, scatter, bubble, pie and radar entries. A running animation of the same entry is cancelled first and the new one starts from the current value. Setting data ends the animation with the entry attoY.inherited -
animateX(
int durationMillis, {EasingFunction easing = Easing.Linear, void onEnd() = _noop}) → void -
Animates the drawing of the data along the x axis. The chart redraws itself while animating. A running x
animation is cancelled first.
inherited
-
animateXY(
int durationMillisX, int durationMillisY, {EasingFunction easingX = Easing.Linear, EasingFunction? easingY, void onEnd() = _noop}) → void -
Animates the drawing of the data along both axes. The chart redraws itself while animating. Running x and y
animations are cancelled first.
inherited
-
animateY(
int durationMillis, {EasingFunction easing = Easing.Linear, void onEnd() = _noop}) → void -
Animates the drawing of the data along the y axis. The chart redraws itself while animating. A running y
animation is cancelled first.
inherited
-
autoScale(
) → void - Recalculates the y axes from the entries between lowestVisibleX and highestVisibleX, then recalculates the offsets. Called on every draw while isAutoScaleMinMaxEnabled is on; call it yourself, followed by invalidate, when you want the same after changing data or the visible range.
-
calcMinMax(
) → void -
Computes the axis ranges from the data.
override
-
calculateLegendOffsets(
MutableRect offsets) → void -
Writes the space in pixels the legend needs on each side into
offsets. Zero when it is drawn inside. -
calculateOffsets(
) → void -
Computes the content rectangle from legend, axis labels, extra offsets and minOffset, then
refreshes the transformers. The rectangle is left alone while setViewPortOffsets is active.
override
-
centerViewTo(
double xValue, double yValue, AxisDependency axis) → void - Scrolls so the given position is at the center of the content area. Runs as a viewport job and redraws (see addViewportJob).
-
centerViewToAnimated(
double xValue, double yValue, AxisDependency axis, int duration) → void - Like centerViewTo, but animates from the current position.
-
centerViewToY(
double yValue, AxisDependency axis) → void -
Scrolls so
yValueis vertically centered. The left edge is moved to x value 0 at the same time, within the viewport limits. Runs as a viewport job and redraws (see addViewportJob). -
clear(
) → void -
Sets data to null, clears the highlight and redraws, which shows noDataText.
inherited
-
clearAllViewportJobs(
) → void -
Drops all jobs waiting in jobs.
inherited
-
clearValues(
) → void -
Removes all data sets from data but keeps the data object, then redraws. Does nothing without data.
inherited
-
computeScroll(
) → void -
Advances a running scroll by one frame,
View.computeScroll(). The base does nothing; charts that decelerate after a fling override it.override -
disableScroll(
) → void -
Keeps the current gesture with the chart, so an enclosing scrollable does not take it over
(
requestDisallowInterceptTouchEvent(true)on Android).inherited -
drawDescription(
Canvas c) → void -
Draws the description text at its position, or in the bottom right corner when it has none.
inherited
-
drawEmptyState(
Canvas canvas) → void -
Draws the empty state: the icon and noDataText, or loadingText while isLoading, as one block centered
vertically and placed horizontally by noDataTextAlignment. Override it to draw an empty state of your own.
inherited
-
drawGridBackground(
Canvas c) → void - Fills the content area and draws its border when the matching flags are on.
-
drawMarkers(
Canvas canvas) → void -
Draws the marker at every highlighted value that lies inside the content area.
inherited
-
drawNoDataIcon(
Canvas canvas, MutableRect bounds, ChartPaint paint) → void -
Draws the outline of this chart type that the empty state shows above its text, inside
bounds, withpaintin noDataIconColor. The default draws three bars; line, pie, radar, scatter and bubble charts draw their own shape.inherited -
enableScroll(
) → void -
Lets an enclosing scrollable take over gestures again (
requestDisallowInterceptTouchEvent(false)on Android).inherited -
fitScreen(
) → void - Undoes all zooming and dragging so the data fills the content area, then recalculates offsets and redraws.
-
getAxis(
AxisDependency axis) → YAxis - The YAxis for the given side.
-
getAxisRange(
AxisDependency axis) → double - Range of the given y axis in values.
-
getDataSetByTouchPoint(
double x, double y) → IBarLineScatterCandleBubbleDataSet< Entry> ? - Data set of the entry nearest to a pixel position, or null when there is no data or no entry within maxHighlightDistance.
-
getEntryByTouchPoint(
double x, double y) → Entry? - Entry nearest to a pixel position, or null when there is no data or no entry within maxHighlightDistance.
-
getHighlightByTouchPoint(
double x, double y) → Highlight? -
Finds the value nearest to a touch position.
inherited
-
getMarkerPosition(
Highlight high) → Float32List -
Pixel position where the marker for
highis drawn, as[x, y].inherited -
getPixelForValues(
double x, double y, AxisDependency axis) → MPPointD - Converts values to a pixel position inside the view.
-
getPosition(
Entry? e, AxisDependency axis) → MPPointF? - Pixel position of an entry inside the view.
-
getTransformer(
AxisDependency axis) → Transformer -
Returns the transformer that maps values of
axisto pixels and back.override -
getValuesByTouchPoint(
double x, double y, AxisDependency axis, [MPPointD? outputPoint]) → MPPointD - Converts a pixel position inside the view to values.
-
highlightValue(
double x, int dataSetIndex, {double y = double.nan, int dataIndex = -1, int stackIndex = -1, bool callListener = true}) → void -
Highlights the entry closest to the given x value (and, when
yis a number, closest toyamong entries with the same x) in one data set and redraws.inherited -
highlightValueOf(
Highlight? highlight, {bool callListener = true}) → void -
Highlights the value described by
highlightand redraws. This is what a tap calls. Null, or a highlight that matches no entry, clears the highlight instead.inherited -
highlightValues(
List< Highlight> highs) → void -
Highlights all the given values at once and redraws. The list is taken as is, without checking that
the entries exist, and no listener is called. An empty list clears the highlight.
inherited
-
init(
) → void -
Creates the components, paints and animator. Subclasses add their renderer, highlighter and touch listener.
override
-
invalidate(
) → void -
Requests a redraw from the host,
View.invalidate(). Does nothing without a host.inherited -
isInverted(
AxisDependency axis) → bool -
True if
axisis drawn with larger values further down.override -
moveViewTo(
double xValue, double yValue, AxisDependency axis) → void -
Scrolls so the left edge sits at
xValueandyValueis vertically centered. Runs as a viewport job and redraws (see addViewportJob). -
moveViewToAnimated(
double xValue, double yValue, AxisDependency axis, int duration) → void - Like moveViewTo, but animates from the current position.
-
moveViewToX(
double xValue) → void - Scrolls so the left edge of the content area sits at the given x value, keeping the vertical position within the viewport limits. Runs as a viewport job and redraws (see addViewportJob).
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyAfterDraw(
) → void -
Calls each of afterDrawListeners. onDraw calls it once at its very end; a chart type that overrides onDraw
and draws after
super.onDrawcalls it at the end of its own onDraw instead, asBarLineChartBase,PieChartandRadarChartdo.inherited -
notifyDataSetChanged(
) → void -
Refreshes the data, recalculates axis ranges, legend and offsets and redraws.
Call it after changing entries or data sets in place. Does nothing while data is null.
override
-
onDetachedFromWindow(
) → void -
Also stops a running fling deceleration, whose ticker runs on the host's vsync.
override
-
onDraw(
Canvas canvas) → void -
Draws the chart onto
canvas, whose origin is the top left corner of the chart,View.onDraw.override -
onHostVsyncChanged(
) → void -
Also stops a running fling deceleration, whose ticker runs on the previous vsync. Not in Kotlin.
override
-
onSizeChanged(
double w, double h) → void -
Sets the chart size to
wxh,View.onSizeChanged: the host calls it when the laid out size changes.override -
onTouchEvent(
ChartTouchEvent event) → bool -
Handles a touch event and returns true if it was consumed,
View.onTouchEvent. The base consumes nothing; charts with gestures pass the event to their chartTouchListener.override -
onValueSelected(
void onValueSelected(Entry entry, Highlight highlight), {void onNothingSelected() = _noop}) → void -
Replaces onChartValueSelectedListener with functions.
inherited
-
post(
void job()) → void -
Runs
jobafter the current frame through the host,View.post(Runnable), or at once without a host.inherited -
prepareOffsetMatrix(
) → void - Refreshes the offset matrices of both transformers, honouring inverted axes.
-
prepareValuePxMatrix(
) → void - Refreshes the value to pixel matrices of both transformers from the current axis ranges.
-
removeViewportJob(
void job()) → void -
Removes a job from jobs before it has run.
inherited
-
resetTracking(
) → void - Resets the draw time statistics printed while isLogEnabled is true.
-
resetViewPortOffsets(
) → void - Removes offsets set with setViewPortOffsets and recalculates them automatically.
-
resetZoom(
) → void - Takes the zoom back to 1 around the content center, recalculates offsets and redraws. fitScreen additionally resets the scale minima.
-
setExtraOffsets(
double left, double top, double right, double bottom) → void -
Sets all four extra offsets in dp at once. They apply on the next offset calculation.
inherited
-
setLastHighlighted(
List< Highlight> ? highs) → void -
Tells the touch listener which highlight a tap must toggle off next.
inherited
-
setScaleMinima(
double scaleX, double scaleY) → void - Sets how far the chart can be zoomed out. A factor of 1 means fully zoomed out; smaller values are raised to 1. The current zoom is clamped at once.
-
setupDefaultFormatter(
double min, double max) → void -
Sets the digit count of the default value formatter from the value range.
inherited
-
setViewPortOffsets(
double left, double top, double right, double bottom) → void - Replaces the automatic offsets with fixed ones and applies them on the next UI loop pass. Legend and axis labels are no longer accounted for; prefer setExtraOffsets unless you need this. resetViewPortOffsets restores automatic offsets.
-
setVisibleXRange(
double minXRange, double maxXRange) → void - Limits the visible span of the x axis in both directions. Computed from the current x axis range, so call it after data is set. A range that is not above 0 does nothing.
-
setVisibleXRangeMaximum(
double maxXRange) → void - Limits how much of the x axis can be visible at once, so the user cannot zoom out further. Computed from the current x axis range, so call it after data is set. A range that is not above 0 does nothing.
-
setVisibleXRangeMinimum(
double minXRange) → void - Limits how little of the x axis can be visible at once, so the user cannot zoom in further. Computed from the current x axis range, so call it after data is set. A range that is not above 0 does nothing.
-
setVisibleYRange(
double minYRange, double maxYRange, AxisDependency axis) → void - Limits the visible span of a y axis in both directions. Computed from the current axis range, so call it after data is set. A range that is not above 0 does nothing.
-
setVisibleYRangeMaximum(
double maxYRange, AxisDependency axis) → void - Limits how much of a y axis can be visible at once, so the user cannot zoom out further. Computed from the current axis range, so call it after data is set. A range that is not above 0 does nothing.
-
setVisibleYRangeMinimum(
double minYRange, AxisDependency axis) → void - Limits how little of a y axis can be visible at once, so the user cannot zoom in further. Computed from the current axis range, so call it after data is set. A range that is not above 0 does nothing.
-
stopAnimations(
) → void -
Ends every running animation at once at its final state: the drawing is complete, a spin stands at its end
angle and animated values hold their targets. Each
onEndruns. Leaving the window does the same.inherited -
toImage(
{int? width, int? height, double pixelRatio = 1.0}) → Future< Image> -
Draws the chart into a new image, over white. Kotlin's
toBitmap.inherited -
toPngBytes(
{int? width, int? height, double pixelRatio = 1.0}) → Future< Uint8List> -
Draws the chart like toImage and encodes the image as PNG.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
valuesToHighlight(
) → bool -
True when at least one value is highlighted.
inherited
-
zoom(
double scaleX, double scaleY, double x, double y, [AxisDependency? axis]) → void -
Zooms by the given factors around a position. Above 1
scaleXandscaleYzoom in, below 1 they zoom out. -
zoomAndCenterAnimated(
double scaleX, double scaleY, double xValue, double yValue, AxisDependency axis, int duration) → void - Animates from the current zoom and position to the given zoom factors, centered on a position given in values. Runs as a viewport job, so it starts once the chart has a size (see addViewportJob).
-
zoomIn(
) → void - Zooms in by a factor of 1.4 around the content center right away, recalculates offsets and redraws.
-
zoomOut(
) → void - Zooms out by a factor of 0.7 around the content center right away, recalculates offsets and redraws.
-
zoomToCenter(
double scaleX, double scaleY) → void - Zooms by the given factors around the content center right away, recalculates offsets and redraws.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited