financial_chart library

A chart library for financial data.

Classes

Aabb2
Defines a 2-dimensional axis-aligned bounding box between a min and a max position.
Aabb3
Defines a 3-dimensional axis-aligned bounding box between a min and a max position.
ArcUtil
CircleUtil
DebounceHelper
EllipseUtil
Frustum
Defines a frustum constructed out of six Planes.
GArcMarker
GArcMarkerRender
GArrowHead
GArrowLineMarker
GArrowLineMarkerRender
GArrowMarker
GArrowMarkerRender
GAxis
The base class of the axis component.
GAxisLabelTheme
Theme for the labels of the axis.
GAxisMarker
GAxisMarkerRender<M extends GAxisMarker>
Render for GAxisMarker.
GAxisMarkerTheme
Base class for axis marker theme
GAxisRender<C extends GAxis>
GAxisTheme
Theme for the axis component.
GBackground
Background of the chart.
GBackgroundRender
The render for GBackground.
GBackgroundTheme
Theme for the GBackground component.
GCalloutMarker
GCalloutMarkerRender
GChart
Chart model.
GChartPainter
GChartRender
GChartWidget
GChartWidgetState
GComponent<T extends GComponentTheme>
Base class for all visible components.
GComponentTheme
Base class for component themes.
GControlHandle
GControlHandleTheme
GCoordinate
base class for coordinate
GCrosshair
Crosshair with vertical and horizontal lines over the chart when pointer is moving over it.
GCrosshairRender
The render for GCrosshair.
GCrosshairTheme
Theme for the GCrosshair component.
GCrosshairUpdateStrategy
The crosshair position update strategy.
GCrosshairUpdateStrategyByTriggers
The crosshair update strategy which update the crosshair position based on the provided on/off triggers.
GCrosshairUpdateStrategyDefault
The default crosshair update strategy which shows the crosshair when the pointer is over, tapped or long pressed
GCrosshairUpdateStrategyNone
The crosshair update strategy which always hide.
GCrosslineMarker
GCrosslineMarkerRender
GCustomCoord
Coordinate with x and y along with a user defined convertor functions.
GData<P>
class for a single data point.
GDataSeriesProperty
Property of a series.
GDataSource<P, D extends GData<P>>
Data container for the chart. ignore: must_be_immutable
GDoublePair
A wrapper of a pair of double values.
GEmptyRender
GFibArcMarker
GFibArcMarkerRender
GFibCircleMarker
GFibCircleMarkerRender
GFibonacciResistanceFanMarkerRender
GFibonacciTimeZoneMarkerRender
GFibResistanceFanMarker
GFibRetracementMarker
GFibRetracementMarkerRender
GFibTimeZoneMarker
GGraph<T extends GGraphTheme>
Base class for graph components.
GGraphArea<T extends GGraphTheme>
Area graph.
GGraphAreaRender
GGraphAreaTheme
Theme for area graph
GGraphBar<T extends GGraphTheme>
Bar graph.
GGraphBarRender
GGraphBarTheme
Theme for grid lines
GGraphGrids<T extends GGraphTheme>
Grid lines
GGraphGridsRender
GGraphGridsTheme
Theme for grid lines
GGraphGroup
A Group of graphs.
GGraphGroupRender
GGraphHighlightMarkerTheme
Theme for the markers of the graph when highlighted.
GGraphLine<T extends GGraphTheme>
Line graph
GGraphLineRender
GGraphLineTheme
Theme for line graph
GGraphOhlc<T extends GGraphTheme>
OHLC (and Candle) graph
GGraphOhlcRender
GGraphOhlcTheme
Theme for OHLC graph
GGraphRender<C extends GGraph<GGraphTheme>, T extends GGraphTheme>
Base class for GGraph renderers.
GGraphStackedBar<T extends GGraphTheme>
Stacked bar graph.
GGraphStackedBarRender
GGraphStackedBarTheme
Theme for stacked bar graph
GGraphTheme
Base class for graph themes
GLabelMarker
GLabelMarkerRender
GLineStats
GMarker
Base class for markers.
GMarkerRender<M extends GMarker, T extends GMarkerTheme>
Base class for rendering a GMarker.
GMarkerTheme
Base class for marker theme
GOvalMarker
GOvalMarkerRender
GOverlayMarker
Base class for Markers overlay on anther component (usually a axis or a graph).
GOverlayMarkerRender<M extends GOverlayMarker, T extends GOverlayMarkerTheme>
Base class for rendering a GOverlayMarker.
GOverlayMarkerScaleHandler<M extends GOverlayMarker>
GOverlayMarkerTheme
Base class for graph marker theme
GPair<T>
A wrapper of a pair of values with general type <T>.
GPanel
Panel of the chart.
GPanelRender
The render for GPanel.
GPanelTheme
Theme for GPanel
GPointAxis
point axis for horizontal direction.
GPointAxisMarker
Markers on the point axis. it can be a label or a range.
GPointAxisMarkerRender
GPointAxisRender
render for point axis lay on horizontal direction.
GPointTickerStrategy
Strategy to calculate point ticks for axis and grids.
GPointTickerStrategyDefault
Default strategy to calculate point ticks.
GPointViewPort
Viewport for point (horizontal) axis
GPointViewPortAutoScaleStrategy
Auto scale strategy for point GPointViewPort.
GPointViewPortAutoScaleStrategyAlignTo
Auto scale strategy that keeps alignToPosition and updates start & end to make point width be GPointViewPort.defaultPointWidth.
GPointViewPortAutoScaleStrategyLatest
Auto scale strategy to let last point at the end (right) of graph area and point width is GPointViewPort.defaultPointWidth.
GPolygonMarker
GPolygonMarkerRender
GPolyLineMarker
GPolyLineMarkerRender
GPositionCoord
Coordinate with x and y as position in the view area.
GRange
A double range with begin and end values.
GRectMarker
GRectMarkerRender
GRender<C extends GComponent<GComponentTheme>, T extends GComponentTheme>
Base class for component renderers.
GRenderUtil
Utility class for rendering.
GShapeMarker
GShapeMarkerRender
GShapes
GSize
A value defines size in view area.
GSplineMarker
GSplineMarkerRender
GSplitter
Splitter (resize handle) component.
GSplitterRender
The render for GSplitter.
GSplitterTheme
Theme for GSplitter
GStatsLineMarker
GStatsLineMarkerRender
GSvgMarker
GSvgMarkerRender
GTableGroupItem
GTableGroupItemPainter
GTableIconItemPainter
GTableItem
GTableItemPainter
GTableItemSpanPainter
GTableLayout
GTableLayoutPainter
GTablePlaceholderItem
GTablePlaceHolderItemPainter
GTableSpanItem
GTableTextItemPainter
GTheme
Theme container for all chart components.
GThemeDark
Preset dark theme.
GThemeLight
Preset light theme.
GTooltip
Tooltip component.
GTooltipRender
GTooltip renderer
GTooltipTheme
Theme for GTooltip component.
GToolTipWidgetContext
GValue<T>
A wrapper of a single value with type <T> and an optional validator.
GValueAxis
value axis for vertical direction.
GValueAxisMarker
Markers on the value axis. it can be a label or a range.
GValueAxisMarkerRender
GValueAxisRender
render for value axis lay on vertical direction.
GValueTickerStrategy
Strategy to calculate value ticks for axis and grids.
GValueTickerStrategyDefault
Default strategy to calculate value ticks.
GValueViewPort
Viewport for value (vertical) axis
GValueViewPortAutoScaleStrategy
Auto scale strategy for value viewport.
GValueViewPortAutoScaleStrategyMinMax
Auto scale strategy to scale viewport to min and max value of data values so all data points be visible in the view area.
GViewPortCoord
Coordinate with x as point in the point view port and y as value in the value view port.
IntersectionResult
Defines a result of an intersection test.
LabelStyle
The style of a text label.
LineUtil
Matrix2
2D Matrix. Values are stored in column major order.
Matrix3
3D Matrix. Values are stored in column major order.
Matrix4
4D Matrix. Values are stored in column major order.
Obb3
Defines a 3-dimensional oriented bounding box defined with a center, halfExtents and axes.
PaintStyle
Plane
PolygonUtil
Quad
Defines a quad by four points.
Quaternion
Defines a Quaternion (a four-dimensional vector) for efficient rotation calculations.
Ray
Defines a Ray by an origin and a direction.
RectUtil
SimplexNoise
Sphere
Defines a sphere with a center and a radius.
SplineUtil
Triangle
Defines a triangle by three points.
Vector
Base class for vectors
Vector2
2D column vector.
Vector3
3D column vector.
Vector4
4D column vector.

Enums

GArcCloseType
GArrowHeadType
GAxisPosition
The position of the axis relative to the graph area.
GAxisScaleMode
The scale mode when drags of the axis interactively.
GControlHandleShape
GControlHandleType
GCrosshairTrigger
The crosshair trigger events.
GGraphPanMode
The action mode when panning the graph area of the panel.
GHitTestMode
Hit test mode of the component.
GPointerScrollMode
Action mode for pointer scroll event (mouse wheel scrolling).
GSizeValueType
Type of size value
GStatsLineFillStyle
GTooltipPosition
Position of the tooltip.
GValueTickerLogScaleIntervalType
The interval type for logarithmic scale value ticks.
GValueViewPortScaleType
The value scale type of value viewport.
GViewPortResizeMode
Defines the behavior of how to update the viewport range when view size changed.

Constants

defaultHAxisSize → const double
defaultVAxisSize → const double
degrees2Radians → const double
Constant factor to convert and angle from degrees to radians.
kDefaultHitTestEpsilon → const double
radians2Degrees → const double
Constant factor to convert and angle from radians to degrees.

Functions

absoluteError(dynamic calculated, dynamic correct) double
Returns absolute error between calculated and correct. The type of calculated and correct must match and can be any vector, matrix, or quaternion.
buildPlaneVectors(Vector3 planeNormal, Vector3 u, Vector3 v) → void
Sets u and v to be two vectors orthogonal to each other and planeNormal.
catmullRom(double edge0, double edge1, double edge2, double edge3, double amount) double
Do a catmull rom spline interpolation with edge0, edge1, edge2 and edge3 by amount.
cross2(Vector2 x, Vector2 y) double
2D cross product. vec2 x vec2.
cross2A(double x, Vector2 y, Vector2 out) → void
2D cross product. double x vec2.
cross2B(Vector2 x, double y, Vector2 out) → void
2D cross product. vec2 x double.
cross3(Vector3 x, Vector3 y, Vector3 out) → void
3D Cross product.
defaultPointValueFormater(int point, dynamic pointValue) String
Default formatter for point value which format it as yyyy-MM-dd assumes the value is milliseconds since epoch.
defaultSeriesValueFormater(double seriesValue, int precision) String
Default formatter for series value.
degrees(double radians) double
Convert radians to degrees.
degreeToTheta(double degree) double
dot2(Vector2 x, Vector2 y) double
2D dot product.
dot3(Vector3 x, Vector3 y) double
3D dot product.
isSingle(List params, {dynamic allowNone = false}) bool
Checks whether only one of the parameters is set. if allowNone, none is set also returns true.
kCoordinateConvertorXPointYPosition({required double x, required double y, required Rect area, required GPointViewPort pointViewPort, required GValueViewPort valueViewPort}) Offset
predefined GCoordinateConvertor to convert x in viewport and y in position to position in the view area.
kCoordinateConvertorXPointYPositionReverse({required double x, required double y, required Rect area, required Offset position, required GPointViewPort pointViewPort, required GValueViewPort valueViewPort}) GCoordinate
kCoordinateConvertorXPositionYValue({required double x, required double y, required Rect area, required GPointViewPort pointViewPort, required GValueViewPort valueViewPort}) Offset
predefined GCoordinateConvertor to convert x in position and y in viewport to position in the view area.
kCoordinateConvertorXPositionYValueReverse({required double x, required double y, required Rect area, required Offset position, required GPointViewPort pointViewPort, required GValueViewPort valueViewPort}) GCoordinate
makeFrustumMatrix(double left, double right, double bottom, double top, double near, double far) Matrix4
Constructs a new OpenGL perspective projection matrix.
makeInfiniteMatrix(double fovYRadians, double aspectRatio, double zNear) Matrix4
Constructs a new OpenGL infinite projection matrix.
makeOrthographicMatrix(double left, double right, double bottom, double top, double near, double far) Matrix4
Constructs a new OpenGL orthographic projection matrix.
makePerspectiveMatrix(double fovYRadians, double aspectRatio, double zNear, double zFar) Matrix4
Constructs a new OpenGL perspective projection matrix.
makePlaneProjection(Vector3 planeNormal, Vector3 planePoint) Matrix4
Returns a transformation matrix that transforms points onto the plane specified with planeNormal and planePoint.
makePlaneReflection(Vector3 planeNormal, Vector3 planePoint) Matrix4
Returns a transformation matrix that transforms points by reflecting them through the plane specified with planeNormal and planePoint.
makeViewMatrix(Vector3 cameraPosition, Vector3 cameraFocusPosition, Vector3 upDirection) Matrix4
Constructs a new OpenGL view matrix.
mix(double min, double max, double a) double
Interpolate between min and max with the amount of a using a linear interpolation. The computation is equivalent to the GLSL function mix.
pickRay(Matrix4 cameraMatrix, num viewportX, num viewportWidth, num viewportY, num viewportHeight, num pickX, num pickY, Vector3 rayNear, Vector3 rayFar) bool
On success, rayNear and rayFar are the points where the screen space pickX, pickY intersect with the near and far planes respectively.
radians(double degrees) double
Convert degrees to radians.
relativeError(dynamic calculated, dynamic correct) double
Returns relative error between calculated and correct. The type of calculated and correct must match and can be any vector, matrix, or quaternion.
setFrustumMatrix(Matrix4 perspectiveMatrix, double left, double right, double bottom, double top, double near, double far) → void
Constructs an OpenGL perspective projection matrix in perspectiveMatrix.
setInfiniteMatrix(Matrix4 infiniteMatrix, double fovYRadians, double aspectRatio, double zNear) → void
Constructs an OpenGL infinite projection matrix in infiniteMatrix. fovYRadians specifies the field of view angle, in radians, in the y direction. aspectRatio specifies the aspect ratio that determines the field of view in the x direction. The aspect ratio of x (width) to y (height). zNear specifies the distance from the viewer to the near plane (always positive).
setModelMatrix(Matrix4 modelMatrix, Vector3 forwardDirection, Vector3 upDirection, double tx, double ty, double tz) → void
Constructs an OpenGL model matrix in modelMatrix. Model transformation is the inverse of the view transformation. Model transformation is also known as "camera" transformation. Model matrix is commonly used to compute a object location/orientation into the full model-view stack.
setOrthographicMatrix(Matrix4 orthographicMatrix, double left, double right, double bottom, double top, double near, double far) → void
Constructs an OpenGL orthographic projection matrix in orthographicMatrix.
setPerspectiveMatrix(Matrix4 perspectiveMatrix, double fovYRadians, double aspectRatio, double zNear, double zFar) → void
Constructs an OpenGL perspective projection matrix in perspectiveMatrix.
setRotationMatrix(Matrix4 rotationMatrix, Vector3 forwardDirection, Vector3 upDirection) → void
Constructs a rotation matrix in rotationMatrix.
setViewMatrix(Matrix4 viewMatrix, Vector3 cameraPosition, Vector3 cameraFocusPosition, Vector3 upDirection) → void
Constructs an OpenGL view matrix in viewMatrix. View transformation is the inverse of the model transformation. View matrix is commonly used to compute the camera location/orientation into the full model-view stack.
smoothStep(double edge0, double edge1, double amount) double
Do a smooth step (hermite interpolation) interpolation with edge0 and edge1 by amount. The computation is equivalent to the GLSL function smoothstep.
thetaToDegree(double theta) double
unproject(Matrix4 cameraMatrix, num viewportX, num viewportWidth, num viewportY, num viewportHeight, num pickX, num pickY, num pickZ, Vector3 pickWorld) bool
On success, Sets pickWorld to be the world space position of the screen space pickX, pickY, and pickZ.

Typedefs

GCoordinateConvertor = Offset Function({required Rect area, required GPointViewPort pointViewPort, required GValueViewPort valueViewPort, required double x, required double y})
User defined function to convert a value pair (x, y) to position in the view area
GCoordinateReverseConvertor = GCoordinate Function({required Rect area, required GPointViewPort pointViewPort, required Offset position, required GValueViewPort valueViewPort, required double x, required double y})
GScaleEndCallback = void Function(int pointerCount, double scaleVelocity, Velocity? velocity)
GScaleUpdateCallback = void Function({required Offset position, required double scale, required double verticalScale})
GToolTipWidgetBuilder = Widget Function(BuildContext context, Size maxSize, GTooltip tooltip, int point)
The builder function to create the tooltip widget.
GViewSizeConvertor = double Function({required Rect area, required GPointViewPort pointViewPort, required double sizeValue, required GValueViewPort valueViewPort})
User defined function to convert a value to size in view area with pointViewPort and valueViewPort.