GraphEngine class
Properties
activeBand
→ String ?
The band in use: the cursor's, else the last row's.
no setter
activeGroup
→ String ?
The group of the band in use.
no setter
axisLeft
→ bool
Whether the y axis is left of the plots (any pane says so).
no setter
barWidth
→ double
A candle's or bar's width.
no setter
bodyRight
→ double
The right edge of the panes and their axes: the graph's, less a
legend beside them.
no setter
count
→ int
no setter
cursor
↔ GraphCursor ?
getter/setter pair
cursorState
→ Json ?
no setter
from
→ double
The positions at the plot's left and right edges: on a linear scale
its whole stretch, or the part of it the user has moved to.
no setter
hashCode
→ int
The hash code for this object.
no setter inherited
hasListeners
→ bool
Whether any listeners are currently registered.
no setter inherited
legend
→ GraphLegendLayout ?
The legend as drawn; null when the spec has none, there is nothing
to tell apart, or it has no room.
no setter
legendKeys
→ List <GraphLegendKey >
What a legend would list: each slice of a polar pane (its color, its
label and its share), else each named mark (an area and the line
along its top once).
no setter
linear
→ bool
Whether rows are placed by a number of theirs (GraphXSpec.scale), not
one place each.
no setter
loadingHistory
→ bool
Older rows have been asked for and have not come yet.
no setter
magnetMark
→ GraphMarkSpec ?
The mark the crosshair snaps to (the first with the magnet field).
no setter
morphing
→ bool
no setter
onNeedHistory
↔ void Function(Json view ) ?
Asked once each time the view comes within the spec's threshold of the
first row: the page's action loads older rows and sets them as data.
getter/setter pair
pinned
→ bool
no setter
plotLeft
→ double
The plots' left and right edges.
no setter
plotRight
→ double
no setter
plotWidth
→ double
no setter
pointer
→ Offset ?
Where the pointer is while it selects; null once it left.
no setter
rows
↔ List <Json >
The rows, with the transforms' fields and _i, each one's position.
getter/setter pair
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
selection
→ GraphHit ?
What is selected: under the pointer, else pinned by a tap.
no setter
selectionAnchor
→ Offset ?
Where a tooltip points: the top of the selected row's place, or the
middle of the selected slice's outer edge.
no setter
selectionState
→ Json ?
no setter
size
↔ Size
getter/setter pair
slotWidth
→ double
The room a row has: a place, or on a linear scale the least stretch
between two rows next to one another.
no setter
spec
↔ GraphSpec
getter/setter pair
state
→ Json
What a page binds: view and cursor.
no setter
to
→ double
no setter
tooltipBounds
→ Rect
Where a tooltip is kept: over the panes, clear of a legend and of the
labels under the plot.
no setter
tweening
→ bool
no setter
viewport
↔ GraphViewport
getter/setter pair
viewState
→ Json
no setter
visible
→ (int , int )
The first and last rows in view (on a linear scale with none in view,
the last is before the first).
no setter
xAxisRect
→ Rect
no setter
xLabels
→ List <(num , String , double , double ) >
The x ticks whose labels are written, each with its text, where it
starts and the width it is cut to (infinite: written whole).
no setter
xTicks
→ List <num >
The positions with a time label: every step-th row, the step the
smallest round one whose labels stand 80 px apart.
no setter
yAxisWidth
→ double
no setter
Methods
addListener (VoidCallback listener )
→ void
Register a closure to be called when the object changes.
inherited
applyView (Json view , {bool notify = true })
→ void
Sets the view from state: {barSpacing, rightOffset}, or {last: n}
for the last n rows across the plot.
arcGeometry (int pane , GraphMarkSpec m )
→ (Offset , double , double )
An arc mark's circle on its pane: center, outer radius and the hole's.
bandAt (num index )
→ GraphBandSpec ?
The band a position is in; null for none.
barGroups (int pane )
→ List <List <int > >
A pane's bars by their place in the row: marks with the same stack are
one group (one on another), every other bar a group of its own. The
numbers are the marks' places in the pane. Overlay bars (volume under
a price) are not grouped: each is drawn across the row.
barRects (int pane , int index )
→ List <(int , Rect ) >
A row's bars on a pane: each drawn mark's place and its box, in the
graph's own pixels.
captureMorph ()
→ void
Remembers the line on screen, before new rows (and a new spec) are
set: the next setData starts from it instead of jumping.
dispose ()
→ void
Discards any resources used by the object.
inherited
emphasis (int pane , int mark , int index )
→ double
How much of itself a row's mark shows: all of it, or the selection's
dim while another is selected.
enter ()
→ void
Starts the marks from zero (GraphSpec.animateIn): tweenTo turned from
0 to 1 grows them to their values.
hitAt (Offset p )
→ GraphHit ?
What is under p; null for nothing.
hover (Offset ? p )
→ void
The pointer is at p (null: it left).
indexAt (double px )
→ double
The position under a pixel.
indexOfKey (Object ? key )
→ int ?
The position of the row with this key; null for none.
markColor (GraphMarkSpec m , int index )
→ Color
A row's color for a mark: its own field's, the mark's list's, or the
mark's.
morphTo (double t )
→ void
A morph's progress, 0 to 1: each point of the new line is drawn
between where the old line was above it and where it belongs.
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners ()
→ void
Call all the registered listeners.
inherited
overlayDomain (int pane , GraphMarkSpec mark )
→ (double , double )
The domain of a mark on a scale of its own (GraphMarkSpec.overlay): from
zero, its largest value in view at the top of its share of the pane.
panBy (double dx )
→ void
panY (int pane , double dy )
→ void
Moves a pane's y by dy pixels, once it is set by hand.
percentBase (int pane )
→ double ?
The value a percent scale measures from: the first row in view's close
(or y) of the pane's first mark.
place (Object ? at )
→ double ?
A place the spec names: a number on a linear scale, a row's key on
rows. Null when it names none.
plotRect (int pane )
→ Rect
A pane's plot.
pos (int index )
→ double
A row's position: its place, or on a linear scale its number.
priceLineValue (GraphPriceLineSpec line )
→ double ?
A price line's value: its own, or its field in the last row.
removeListener (VoidCallback listener )
→ void
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
resetX ()
→ void
resetY (int pane )
→ void
Fits a pane's y again.
resize (Size value )
→ void
rowAt (double px )
→ int
The row nearest a pixel (on rows, the place under it: it may be past
either end).
scaleY (int pane , double factor )
→ void
Scales a pane's y about its middle: autoscale goes off.
select (Json ? value )
→ void
Sets the pinned selection from state: {index} or {index, mark}
(the mark's place in its pane); null lets go.
selectionRows ()
→ List <(Color , String , double ) >
The marks a tooltip lists for the selection: color, name and value.
setCursor (Offset ? p )
→ void
The pointer at p (null: away). The cursor is the row under it, at the
magnet field's price when the spec names one.
setData (List <Json > data , {bool tween = false })
→ void
New rows. Told apart by the spec's key: rows after the last one known
are followed (a view at the end) or left off screen (a view back in
history); older rows put before move nothing; a row with a known key is
an update in place.
slices (GraphMarkSpec m )
→ List <GraphSlice >
An arc mark's slices: each row's share of the turn (a negative or
missing value has none).
tap (Offset p )
→ void
A tap at p: it pins what is there; on what is pinned, or on nothing,
it lets go.
textWidth (String text , double fontSize , {FontWeight ? weight , double ? maxWidth })
→ double
A text's width as the graph writes it; with a maxWidth, as cut to
it with an ellipsis.
toString ()
→ String
A string representation of this object.
inherited
tweenTo (double t )
→ void
A tween's progress, 0 to 1: each mark's value between what it was and
what it is, on the scale of where it is going.
valueAt (int pane , double py )
→ double
xLabel (int index , [String ? format ])
→ String
xOf (num position )
→ double
A position's pixel.
xOfRow (int index )
→ double
A row's pixel.
xTickLabel (int index )
→ String
A tick's label: its own unit, or the larger one it also starts (a
year at January, a month at its first day).
xTickText (num position )
→ String
What is written at an x tick: the spec's label for it, the row's
label, or on a linear scale the number.
yAuto (int pane )
→ bool
Whether a pane's y is fitted (not set by hand).
yAxisRect (int pane )
→ Rect
yDomain (int pane )
→ (double , double )
A pane's y domain.
yLabel (int pane , num value )
→ String
yOf (int pane , double value )
→ double
yTicks (int pane )
→ List <num >
A pane's y ticks: round values about five apart (a percent scale's:
round percents).
zoneAt (Offset p )
→ GraphZone
zoomAt (double px , double factor )
→ void
px is from the plot's left.