AcmeChart class
A lite version of AcmeChart that does not import dialog or shared_preferences dependencies, keeping the web bundle smaller for consumers that manage their own indicatorsRepo and drawingToolsRepo.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- AcmeChart
Constructors
-
AcmeChart({required DataSeries<
Tick> mainSeries, required int granularity, required String activeSymbol, MarkerSeries? markerSeries, ChartController? controller, VoidCallback? onCrosshairAppeared, VoidCallback? onCrosshairDisappeared, OnCrosshairHoverCallback? onCrosshairHover, VisibleAreaChangedCallback? onVisibleAreaChanged, VisibleQuoteAreaChangedCallback? onQuoteAreaChanged, ChartTheme? theme, bool isLive = false, bool dataFitEnabled = false, bool showCrosshair = true, List<ChartAnnotation< ? annotations, double opacity = 1.0, int pipSize = 4, ChartAxisConfig chartAxisConfig = const ChartAxisConfig(), Repository<ChartObject> >IndicatorConfig> ? indicatorsRepo, Repository<DrawingToolConfig> ? drawingToolsRepo, DrawingTools? drawingTools, double? msPerPx, double? minIntervalWidth, double? maxIntervalWidth, EdgeInsets? dataFitPadding, Duration? currentTickAnimationDuration, Duration? quoteBoundsAnimationDuration, bool? showCurrentTickBlinkAnimation, double? verticalPaddingFraction, EdgeInsets? bottomChartTitleMargin, bool? showDataFitButton, bool? showScrollToLastTickButton, Color? loadingAnimationColor, CrosshairVariant crosshairVariant = CrosshairVariant.smallScreen, InteractiveLayerBehaviour? interactiveLayerBehaviour, bool useDrawingToolsV2 = false, Key? key}) -
Initializes
const
Properties
- activeSymbol → String
-
Current active symbol.
final
-
annotations
→ List<
ChartAnnotation< ?ChartObject> > -
Chart's annotations
final
- bottomChartTitleMargin → EdgeInsets?
-
Specifies the margin to prevent overlap.
final
- chartAxisConfig → ChartAxisConfig
-
Configurations for chart's axes.
final
- controller → ChartController?
-
Chart's controller
final
- crosshairVariant → CrosshairVariant
-
The variant of the crosshair to be used.
This is used to determine the type of crosshair to display.
The default is CrosshairVariant.smallScreen.
CrosshairVariant.largeScreen is mostly for web.
final
- currentTickAnimationDuration → Duration?
-
Duration of the current tick animated transition.
final
- dataFitEnabled → bool
-
Starts in data fit mode and adds a data-fit button.
final
- dataFitPadding → EdgeInsets?
-
Padding around data used in data-fit mode.
final
- drawingTools → DrawingTools?
-
Drawing tools
final
-
drawingToolsRepo
→ Repository<
DrawingToolConfig> ? -
Chart's drawings
final
- granularity → int
-
For candles: Duration of one candle in ms.
For ticks: Average ms difference between two consecutive ticks.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
indicatorsRepo
→ Repository<
IndicatorConfig> ? -
Chart's indicators
final
- interactiveLayerBehaviour → InteractiveLayerBehaviour?
-
Defines the behaviour that interactive layer should have.
final
- isLive → bool
-
Whether the chart should be showing live data or not.
In case of being true the chart will keep auto-scrolling when its visible
area is on the newest ticks/candles.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- loadingAnimationColor → Color?
-
The color of the loading animation.
final
-
mainSeries
→ DataSeries<
Tick> -
Chart's main data series
final
- markerSeries → MarkerSeries?
-
Open position marker series.
final
- maxIntervalWidth → double?
-
Specifies the maximum interval width
that is used for calculating the maximum msPerPx.
final
- minIntervalWidth → double?
-
Specifies the minimum interval width
that is used for calculating the maximum msPerPx.
final
- msPerPx → double?
-
Specifies the zoom level of the chart.
final
- onCrosshairAppeared → VoidCallback?
-
Called when crosshair details appear after long press.
final
- onCrosshairDisappeared → VoidCallback?
-
Called when the crosshair is dismissed.
final
- onCrosshairHover → OnCrosshairHoverCallback?
-
Called when the crosshair cursor is hovered/moved.
final
- onQuoteAreaChanged → VisibleQuoteAreaChangedCallback?
-
Callback provided by library user.
final
- onVisibleAreaChanged → VisibleAreaChangedCallback?
-
Called when chart is scrolled or zoomed.
final
- opacity → double
-
Chart's opacity, Will be applied on the mainSeries.
final
- pipSize → int
-
Number of digits after decimal point in price.
final
- quoteBoundsAnimationDuration → Duration?
-
Duration of quote bounds animated transition.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showCrosshair → bool
-
Whether the crosshair should be shown or not.
final
- showCurrentTickBlinkAnimation → bool?
-
Whether to show current tick blink animation or not.
final
- showDataFitButton → bool?
-
Whether the data fit button is shown or not.
final
- showScrollToLastTickButton → bool?
-
Whether to show the scroll to last tick button or not.
final
- theme → ChartTheme?
-
Chart's theme.
final
- useDrawingToolsV2 → bool
-
Whether to use the new drawing tools v2 or not.
final
- verticalPaddingFraction → double?
-
Fraction of the chart's height taken by top or bottom padding.
Quote scaling (drag on quote area) is controlled by this variable.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< AcmeChart> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited