### Stacked Bar Chart Example Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/BarChartRodData/BarChartRodData.html Example of how to create a stacked bar chart using rodStackItems with different colors for each segment. ```dart BarChartRodData( y: 9, color: Colors.grey, rodStackItems: [ BarChartRodStackItem(0, 3, Colors.red), BarChartRodStackItem(3, 6, Colors.green), BarChartRodStackItem(6, 9, Colors.blue), ] ) ``` -------------------------------- ### defaultGetTouchLineStart Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/defaultGetTouchLineStart.html This function calculates the starting vertical position for touch interactions on a line chart. It takes the bar data and the index of the current spot as input. By default, it returns negative infinity, effectively placing the touch start at the bottom of the chart. ```APIDOC ## defaultGetTouchLineStart ### Description Calculates the starting vertical position for touch interactions on a line chart. By default, the line starts from the bottom of the chart. ### Function Signature double defaultGetTouchLineStart(LineChartBarData barData, int spotIndex) ### Parameters - **barData** (LineChartBarData) - The data for the line chart bar. - **spotIndex** (int) - The index of the current spot on the line. ### Return Value - **double** - The calculated starting vertical position for touch interaction. ``` -------------------------------- ### BarChartRodStackItem Constructor Example Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/BarChartRodStackItem/BarChartRodStackItem.html Demonstrates how to create a BarChartRodStackItem for a stacked bar chart. Use this to define segments with specific colors and ranges. ```dart BarChartRodData( y: 9, color: Colors.grey, rodStackItems: [ BarChartRodStackItem(0, 3, Colors.red), BarChartRodStackItem(3, 6, Colors.green), BarChartRodStackItem(6, 9, Colors.blue), ] ) ``` -------------------------------- ### FlPanStartEvent Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/FlPanStartEvent/FlPanStartEvent.html The constructor for FlPanStartEvent allows you to create an instance by providing the drag start details. ```APIDOC ## FlPanStartEvent Constructor ### Description Creates a new FlPanStartEvent with the provided drag start details. ### Parameters #### Path Parameters - **details** (DragStartDetails) - Required - The details of the drag start event. ``` -------------------------------- ### Default Touch Line Start Implementation Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/defaultGetTouchLineStart.html This function provides the default behavior for determining the starting vertical position of a touch interaction on a line chart. It returns negative infinity, causing the interaction to originate from the bottom of the chart. ```dart double defaultGetTouchLineStart(LineChartBarData barData, int spotIndex) { return -double.infinity; } ``` -------------------------------- ### BarChartDataTween Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/BarChartDataTween/BarChartDataTween.html Initializes a BarChartDataTween with a starting and ending BarChartData for animation. ```APIDOC ## BarChartDataTween ### Description Creates a BarChartDataTween object, which is used for animating between two `BarChartData` states. ### Parameters #### Constructor Parameters - **begin** (BarChartData) - Required - The initial `BarChartData` state. - **end** (BarChartData) - Required - The final `BarChartData` state. ### Example ```dart BarChartDataTween(begin: initialData, end: finalData) ``` ``` -------------------------------- ### DragStartDetails Property Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/FlPanStartEvent/details.html This property holds information about a touch gesture that has started. It is declared as a final variable. ```dart final DragStartDetails details; ``` -------------------------------- ### BackgroundBarChartRodData Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/BackgroundBarChartRodData/BackgroundBarChartRodData.html Initializes a BackgroundBarChartRodData object. This data is used to render a background for a bar chart rod, starting from `fromY` and ending at `toY`. You can specify a `color` or a `gradient` for the background. The `show` property controls its visibility. If neither `color` nor `gradient` is provided, a default color is used. ```APIDOC ## BackgroundBarChartRodData Constructor ### Description Initializes a BackgroundBarChartRodData object. This data is used to render a background for a bar chart rod, starting from `fromY` and ending at `toY`. You can specify a `color` or a `gradient` for the background. The `show` property controls its visibility. If neither `color` nor `gradient` is provided, a default color is used. ### Parameters - **fromY** (double?) - Optional - The starting Y-value for the background. - **toY** (double?) - Optional - The ending Y-value for the background. - **show** (bool?) - Optional - Whether to display the background. - **color** (Color?) - Optional - The color of the background. - **gradient** (Gradient?) - Optional - The gradient of the background. ### Implementation Details ```dart BackgroundBarChartRodData({ double? fromY, double? toY, bool? show, Color? color, this.gradient, }) : fromY = fromY ?? 0, toY = toY ?? 0, show = show ?? false, color = color ?? ((color == null && gradient == null) ? Colors.blueGrey : null); ``` ``` -------------------------------- ### BackgroundBarChartRodData Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/BackgroundBarChartRodData-class.html Initializes a BackgroundBarChartRodData object. This background rod will be rendered behind the main rod, starting from `fromY` and ending at `toY`. It can be styled with a `color` or a `gradient`. Use the `show` property to control its visibility. ```APIDOC ## BackgroundBarChartRodData ### Description Holds values to draw a rod in rear of the main rod. If you want to have a bar drawn in rear of the main rod, use BarChartRodData.backDrawRodData, it uses to have a bar with a passive color in rear of the rod, for example you can use it as the maximum value place holder in rear of your rod. ### Parameters - **fromY** (double?) - The Y-coordinate where the background starts to show. - **toY** (double?) - The Y-coordinate where the background ends. - **show** (bool?) - Determines whether to show or hide the background rod. - **color** (Color?) - The color to draw the background rod. If null, a gradient will be used. - **gradient** (Gradient?) - The gradient to draw the background rod. If null, a color will be used. ### Notes - You must provide either `color` or `gradient`, but not both. - The background starts to show from `fromY` to `toY`. ``` -------------------------------- ### FlPanStartEvent Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/FlPanStartEvent/FlPanStartEvent.html Creates a new FlPanStartEvent with the provided drag start details. This is used internally by the charting library to track the beginning of a pan gesture. ```dart const FlPanStartEvent(this.details); ``` -------------------------------- ### Get Touch Line Start Property Declaration Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/LineTouchData/getTouchLineStart.html This snippet shows the declaration of the getTouchLineStart property, which determines the y-axis starting point of the touch line. It defaults to the bottom of the chart. ```dart final GetTouchLineY getTouchLineStart; ``` -------------------------------- ### FlLongPressStart Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/FlLongPressStart-class.html Initializes a new instance of the FlLongPressStart class with the provided LongPressStartDetails. ```APIDOC ## FlLongPressStart(LongPressStartDetails details) ### Description Constructs a FlLongPressStart event with the given details. ### Parameters #### Path Parameters - **details** (LongPressStartDetails) - Required - Contains information about the touch gesture that occurred. ``` -------------------------------- ### FlLongPressStart Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/FlLongPressStart/FlLongPressStart.html Creates a new FlLongPressStart object with the provided LongPressStartDetails. ```APIDOC ## FlLongPressStart ### Description Represents the details of a long press event start. ### Constructor `const FlLongPressStart(LongPressStartDetails details)` ### Parameters #### Path Parameters - **details** (LongPressStartDetails) - Required - The details of the long press event. ``` -------------------------------- ### getTouchLineStart Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/LineTouchData/getTouchLineStart.html The starting point on the y-axis of the touch line. By default, the line starts on the bottom of the chart. ```APIDOC ## getTouchLineStart Property ### Description The starting point on the y-axis of the touch line. By default, the line starts on the bottom of the chart. ### Type `GetTouchLineY` ### Default Value Starts on the bottom of the chart. ``` -------------------------------- ### FlLongPressStart Methods Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/FlLongPressStart-class.html Methods available for the FlLongLongPressStart class. ```APIDOC ## Methods ### noSuchMethod - **Signature**: noSuchMethod(Invocation invocation) → dynamic - **Description**: Invoked when a nonexistent method or property is accessed. - **Access**: inherited ### toString - **Signature**: toString() → String - **Description**: A string representation of this object. - **Access**: inherited ``` -------------------------------- ### BarTouchTooltipData Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/BarTouchTooltipData-class.html Initializes BarTouchTooltipData with various properties to customize the tooltip's appearance and behavior. Tooltips are shown automatically when `BarTouchData.handleBuiltInTouches` is true, or can be manually displayed. Customizations include background color, border radius, padding, margin, content, maximum width, and fitting inside chart boundaries. ```APIDOC ## BarTouchTooltipData ### Description Holds representation data for showing tooltip popup on top of rods. ### Constructor ```dart BarTouchTooltipData({ BorderRadius? tooltipBorderRadius, EdgeInsets? tooltipPadding, double? tooltipMargin, FLHorizontalAlignment? tooltipHorizontalAlignment, double? tooltipHorizontalOffset, double? maxContentWidth, GetBarTooltipItem? getTooltipItem, GetBarTooltipColor? getTooltipColor, bool? fitInsideHorizontally, bool? fitInsideVertically, TooltipDirection? direction, double? rotateAngle, BorderSide? tooltipBorder, }) ``` ### Usage Notes If `BarTouchData.handleBuiltInTouches` is true, `BarChart` automatically displays a tooltip on touch. Otherwise, use `BarChartGroupData.showingTooltipIndicators` to show it manually. The tooltip uses `getTooltipColor` for its background and can be styled with `tooltipRoundedRadius` or `tooltipBorderRadius`. `tooltipPadding` adds internal spacing, and `tooltipMargin` adds a bottom margin. `getTooltipItem` allows custom content. `maxContentWidth` restricts the tooltip's width. `fitInsideHorizontally` and `fitInsideVertically` ensure the tooltip stays within the chart bounds. ``` -------------------------------- ### fromY Property Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/BarChartRodData/fromY.html The `fromY` property defines the starting Y-coordinate from which a `BarChart` rod is rendered vertically. This is useful for creating bars that do not start from the zero axis. ```APIDOC ## fromY Property ### Description Defines the starting vertical position for a bar rod in `BarChart`. The rod is rendered vertically from this `fromY` value. ### Type double ### Implementation ```dart final double fromY; ``` ``` -------------------------------- ### FlTouchEvent Constructors and Properties Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/FlTouchEvent-class.html Documentation for the FlTouchEvent class, including its constructor and key properties. ```APIDOC ## FlTouchEvent Class ### Description Parent class for several kinds of touch/pointer events (like tap, panMode, longPressStart, ...). ### Constructors #### FlTouchEvent() Default constructor for FlTouchEvent. ### Properties #### hashCode → int The hash code for this object. #### isInterestedForInteractions → bool Excludes exit or up events to show interactions on charts. #### localPosition → Offset? Represents the position of the happened touch/pointer event. #### runtimeType → Type A representation of the runtime type of the object. ``` -------------------------------- ### Get RadarChart titleCount Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/RadarChartData/titleCount.html Use this property to get the number of RadarChart grid lines. It's derived from the length of data entries in the first dataset. ```dart int get titleCount => dataSets[0].dataEntries.length; ``` -------------------------------- ### ScatterTouchTooltipData Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/ScatterTouchTooltipData-class.html Initializes ScatterTouchTooltipData with various customization options for tooltips. If ScatterTouchData.handleBuiltInTouches is true, tooltips appear automatically on touch. Otherwise, they can be shown manually. Tooltips are displayed on top of spots with customizable background color, padding, border radius, and content via callbacks. ```APIDOC ## ScatterTouchTooltipData Constructor ### Description Initializes ScatterTouchTooltipData with various customization options for tooltips. If ScatterTouchData.handleBuiltInTouches is true, tooltips appear automatically on touch. Otherwise, they can be shown manually. Tooltips are displayed on top of spots with customizable background color, padding, border radius, and content via callbacks. ### Parameters - **tooltipBorderRadius** (BorderRadius?) - Optional - Sets a rounded radius for the tooltip. - **tooltipPadding** (EdgeInsets?) - Optional - Applies a padding for showing contents inside the tooltip. - **tooltipHorizontalAlignment** (FLHorizontalAlignment?) - Optional - Controls showing tooltip on left side, right side or center aligned with spot, default is center. - **tooltipHorizontalOffset** (double?) - Optional - Applies horizontal offset for showing tooltip, default is zero. - **maxContentWidth** (double?) - Optional - Restricts the tooltip's width. - **getTooltipItems** (GetScatterTooltipItems?) - Optional - Retrieves data for showing content inside the tooltip. - **fitInsideHorizontally** (bool?) - Optional - Forces the tooltip to shift horizontally inside the chart, if overflow happens. - **fitInsideVertically** (bool?) - Optional - Forces the tooltip to shift vertically inside the chart, if overflow happens. - **rotateAngle** (double?) - Optional - Controls the rotation of the tooltip. - **tooltipBorder** (BorderSide?) - Optional - The tooltip border color. - **getTooltipColor** (GetScatterTooltipColor?) - Optional - Retrieves data for showing content inside the tooltip. ``` -------------------------------- ### FlLongPressStart Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/FlLongPressStart/FlLongPressStart.html Initializes a new FlLongPressStart object with the provided LongPressStartDetails. This is the primary way to create an instance of FlLongPressStart. ```dart const FlLongPressStart(this.details); ``` -------------------------------- ### crossAlignment Property Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/FlSimpleErrorPainter/crossAlignment.html The alignment of the error lines, it should be between -1 (start) and 1 (end). ```APIDOC ## Property: crossAlignment ### Description The alignment of the error lines. This value should be between -1 (start) and 1 (end). ### Type double ### Example ```dart final double crossAlignment; ``` ``` -------------------------------- ### TouchLineBarSpot Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/TouchLineBarSpot-class.html Initializes a new instance of the TouchLineBarSpot class. ```APIDOC ## TouchLineBarSpot(LineChartBarData bar, int barIndex, FlSpot spot, double distance) ### Description Constructs a TouchLineBarSpot with the provided bar data, bar index, spot details, and touch distance. ### Parameters - **bar** (LineChartBarData) - The bar data associated with the spot. - **barIndex** (int) - The index of the bar within the chart's data. - **spot** (FlSpot) - The specific spot data. - **distance** (double) - The distance in pixels from the touch point to the spot. ``` -------------------------------- ### SizedPicture Example Usage Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/SizedPicture-class.html Demonstrates how to load an SVG string and create a SizedPicture instance. ```APIDOC ## Example Usage ```dart Future loadSvg() async { const String rawSvg = 'your svg string'; final DrawableRoot svgRoot = await svg.fromSvgString(rawSvg, rawSvg); final sizedPicture = SizedPicture(svgRoot.toPicture(), 14, 14); return sizedPicture; } ``` ``` -------------------------------- ### Get Bar Tooltip Color Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/BarTouchTooltipData/getTooltipColor.html Retrieves data for setting the background color of the tooltip. ```dart final GetBarTooltipColor getTooltipColor; ``` -------------------------------- ### BaseTouchResponse Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/BaseTouchResponse/BaseTouchResponse.html Initializes a BaseTouchResponse with the required touch location. ```APIDOC ## BaseTouchResponse constructor ### Description Creates a new BaseTouchResponse instance. ### Parameters #### Path Parameters - **touchLocation** (Offset) - Required - The location of the touch event. ``` -------------------------------- ### BarAreaSpotsLine Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/BarAreaSpotsLine-class.html Initializes a BarAreaSpotsLine. If `show` is true, LineChart draws lines on or below the spots. Customize line appearance with `flLineStyle` and control visibility per spot with `checkToShowSpotLine`. ```APIDOC ## BarAreaSpotsLine ### Description Initializes a BarAreaSpotsLine. If `show` is true, LineChart draws lines on or below the spots. Customize line appearance with `flLineStyle` and control visibility per spot with `checkToShowSpotLine`. ### Parameters - **show** (bool) - Optional - Determines to show or hide all the lines. - **flLineStyle** (FlLine) - Optional - Holds appearance of drawing line on the spots. - **checkToShowSpotLine** (CheckToShowSpotLine) - Optional - Checks to show or hide lines on the spots. - **applyCutOffY** (bool) - Optional - Determines to inherit the cutOff properties from its parent BarAreaData. ``` -------------------------------- ### FlTouchData Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/FlTouchData-class.html Initializes FlTouchData with configuration for touch event handling. ```APIDOC ## FlTouchData Constructor ### Description Initializes FlTouchData with configuration for touch event handling. ### Parameters - **enabled** (bool) - Determines if touch events are enabled. - **touchCallback** (BaseTouchCallback?) - A callback function that is triggered when a touch event occurs. - **mouseCursorResolver** (MouseCursorResolver?) - A resolver function to customize the mouse cursor based on touch events and responses. - **longPressDuration** (Duration?) - The duration for a long-press gesture to be recognized. ``` -------------------------------- ### isUpward Method Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/BarChartRodData/isUpward.html Determines the upward or downward direction of the bar based on its start and end Y values. ```APIDOC ## isUpward() ### Description Determines the upward or downward direction. ### Method Signature `bool isUpward()` ### Implementation ```dart bool isUpward() => toY >= fromY; ``` ``` -------------------------------- ### PieTouchData Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/PieTouchData/PieTouchData.html Initializes PieTouchData with options for enabling touch, handling touch callbacks, resolving mouse cursors, and setting long press duration. ```APIDOC ## PieTouchData Constructor ### Description Initializes PieTouchData with options for enabling touch, handling touch callbacks, resolving mouse cursors, and setting long press duration. You can disable or enable the touch system using the `enabled` flag. `touchCallback` notifies you about the happened touch/pointer events. It gives you a `FlTouchEvent` which is the happened event such as `FlPointerHoverEvent`, `FlTapUpEvent`, ... It also gives you a `PieTouchResponse` which contains information about the elements that have touched. Using `mouseCursorResolver` you can change the mouse cursor based on the provided `FlTouchEvent` and `PieTouchResponse`. ### Parameters - **enabled** (bool?) - Optional - Controls whether the touch system is enabled. - **touchCallback** (BaseTouchCallback?) - Optional - A callback function that is triggered on touch events. - **mouseCursorResolver** (MouseCursorResolver?) - Optional - A function to resolve the mouse cursor based on touch events and responses. - **longPressDuration** (Duration?) - Optional - The duration for a long press event. ``` -------------------------------- ### HorizontalRangeAnnotation y1 Property Declaration Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/HorizontalRangeAnnotation/y1.html Declares the y1 property, which defines the starting vertical position of the annotation. ```dart final double y1; ``` -------------------------------- ### FlPanStartEvent Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/FlPanStartEvent-class.html Creates an instance of FlPanStartEvent. This event is triggered when a pointer has contacted the screen and started to move. ```APIDOC ## FlPanStartEvent Constructor ### Description Creates an instance of the FlPanStartEvent class. ### Signature ```dart FlPanStartEvent(DragStartDetails details) ``` ### Parameters * `details` (DragStartDetails) - Required - Contains information about the touch gesture that initiated the pan start event. ``` -------------------------------- ### Initialize ScatterLabelSettings Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/ScatterChartData/scatterLabelSettings.html Shows how to declare and initialize the scatterLabelSettings property. ```dart final ScatterLabelSettings scatterLabelSettings; ``` -------------------------------- ### BarTooltipItem Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/BarTooltipItem-class.html Initializes a BarTooltipItem with text, text style, and optional alignment and direction properties. ```APIDOC ## BarTooltipItem Constructor ### Description Creates a BarTooltipItem to hold tooltip content. ### Parameters - **text** (String) - The main text content of the tooltip. - **textStyle** (TextStyle) - The style to apply to the text. - **textAlign** (TextAlign, optional) - The alignment of the text. Defaults to TextAlign.center. - **textDirection** (TextDirection, optional) - The direction of the text. Defaults to TextDirection.ltr. - **children** (List?, optional) - Additional styled text spans to append to the main text. ``` -------------------------------- ### x1 Property Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/VerticalRangeAnnotation/x1.html The x1 property is a double value that determines the starting point in the horizontal (x) axis for the VerticalRangeAnnotation. ```APIDOC ## x1 Property ### Description Determines starting point in horizontal (x) axis. ### Type double ### Declaration ```dart final double x1; ``` ``` -------------------------------- ### BarTooltipItem Constructor Implementation Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/BarTooltipItem/BarTooltipItem.html This code shows the implementation of the BarTooltipItem constructor. It initializes the text, textStyle, and optional properties like textAlign and textDirection. ```dart BarTooltipItem( this.text, this.textStyle, { this.textAlign = TextAlign.center, this.textDirection = TextDirection.ltr, this.children, }); ``` -------------------------------- ### RadarChartDataTween Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/RadarChartDataTween/RadarChartDataTween.html Initializes a RadarChartDataTween with a starting and ending RadarChartData. This is used for animating changes in radar chart data. ```APIDOC ## RadarChartDataTween ### Description Creates a tween animation between two `RadarChartData` objects. ### Parameters #### Constructor Parameters - **begin** (RadarChartData) - Required - The starting `RadarChartData` for the animation. - **end** (RadarChartData) - Required - The ending `RadarChartData` for the animation. ### Example ```dart final radarTween = RadarChartDataTween( begin: RadarChartData(...), end: RadarChartData(...), ); ``` ``` -------------------------------- ### PieChartDataTween Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/PieChartDataTween/PieChartDataTween.html Initializes a PieChartDataTween with the starting and ending PieChartData. This is used for animating changes in pie chart data. ```dart PieChartDataTween({required PieChartData begin, required PieChartData end}) : super(begin: begin, end: end); ``` -------------------------------- ### AxisBaseTouchResponse Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/AxisBaseTouchResponse-class.html Initializes a new instance of the AxisBaseTouchResponse class. ```APIDOC ## AxisBaseTouchResponse Constructor ### Description Creates an instance of AxisBaseTouchResponse. ### Parameters - **touchLocation** (Offset) - Required - The location of the touch in pixels on the screen. - **touchChartCoordinate** (Offset) - Required - The axis coordinate of the touch in chart's coordinate system. ``` -------------------------------- ### FlBorderData Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/FlBorderData-class.html Initializes FlBorderData with options to show/hide the border and define its visual style. ```APIDOC ## FlBorderData({bool? show, Border? border}) ### Description Initializes FlBorderData with options to show/hide the border and define its visual style. ### Parameters - **show** (bool?) - Optional - Determines showing or hiding border around the chart. - **border** (Border?) - Optional - Determines the visual look of 4 borders, see Border. ``` -------------------------------- ### y1 Property Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/HorizontalRangeAnnotation/y1.html The y1 property is a final double value that determines the starting point in the vertical (y) axis for the HorizontalRangeAnnotation. ```APIDOC ## y1 Property ### Description Determines starting point in vertical (y) axis. ### Type double ### Declaration ```dart final double y1; ``` ``` -------------------------------- ### Get Candlestick Tooltip Items Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/CandlestickTouchTooltipData/getTooltipItems.html This property retrieves data for showing content inside the tooltip. It is declared as final. ```dart final GetCandlestickTooltipItems getTooltipItems; ``` -------------------------------- ### BaseTouchResponse Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/BaseTouchResponse-class.html Initializes a BaseTouchResponse object with the touch location. ```APIDOC ## BaseTouchResponse Constructor ### Description Initializes a new instance of the `BaseTouchResponse` class. ### Parameters - **touchLocation** (Offset) - Required - The location of the touch in pixels on the screen. ``` -------------------------------- ### VerticalRangeAnnotation x1 Property Declaration Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/VerticalRangeAnnotation/x1.html This snippet shows the declaration of the x1 property, which is a double determining the starting horizontal coordinate. ```dart final double x1; ``` -------------------------------- ### FlTouchEvent Methods and Operators Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/FlTouchEvent-class.html Documentation for the methods and operators available on the FlTouchEvent class. ```APIDOC ## FlTouchEvent Methods and Operators ### Methods #### noSuchMethod(Invocation invocation) → dynamic Invoked when a nonexistent method or property is accessed. #### toString() → String A string representation of this object. ### Operators #### operator ==(Object other) → bool The equality operator. ``` -------------------------------- ### FlLabel Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/FlLabel-class.html Initializes a new FlLabel with customizable properties. ```APIDOC ## Constructors ### FlLabel ```dart FlLabel({bool show = true, String text = '', TextStyle? style, double angle = 0, TextDirection textDirection = TextDirection.ltr}) ``` Initializes a new instance of the FlLabel class. - **show** (bool): Whether the label is visible. Defaults to `true`. - **text** (String): The text content of the label. Defaults to an empty string. - **style** (TextStyle?): The text style of the label. Defaults to `null`. - **angle** (double): The rotation angle of the label in degrees. Defaults to `0`. - **textDirection** (TextDirection): The text direction of the label. Defaults to `TextDirection.ltr`. ``` -------------------------------- ### getDrawingHorizontalLine Property Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/FlGridData/getDrawingHorizontalLine.html This property allows you to get an FlLine object that represents a specified horizontal grid line by providing its y-value. ```APIDOC ## getDrawingHorizontalLine Property ### Description GetDrawingGridLine getDrawingHorizontalLine Gives you a y value, and gets a FlLine that represents specified line. ### Implementation ```dart final GetDrawingGridLine getDrawingHorizontalLine; ``` ``` -------------------------------- ### LineTouchData Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/LineTouchData-class.html Initializes LineTouchData with various configuration options for touch interactions. ```APIDOC ## LineTouchData You can disable or enable the touch system using the `enabled` flag. ### Parameters - `enabled` (bool): Whether touch events are enabled. Defaults to `true`. - `touchCallback` (BaseTouchCallback?): Callback for touch events. - `mouseCursorResolver` (MouseCursorResolver?): Resolves mouse cursor based on touch events. - `longPressDuration` (Duration?): Duration for long press gesture. Defaults to 500 milliseconds. - `touchTooltipData` (LineTouchTooltipData): Configuration for touch tooltips. Defaults to `const LineTouchTooltipData()`. - `getTouchedSpotIndicator` (GetTouchedSpotIndicator): Configuration for touch indicators. Defaults to `defaultTouchedIndicators`. - `touchSpotThreshold` (double): Distance threshold for touch event detection. Defaults to `10`. - `distanceCalculator` (CalculateTouchDistance): Function to calculate distance for finding closest points. Defaults to `_xDistance`. - `handleBuiltInTouches` (bool): Whether to handle default built-in touch responses. Defaults to `true`. - `getTouchLineStart` (GetTouchLineY): Function to determine the start Y-axis point of the touch line. Defaults to `defaultGetTouchLineStart`. - `getTouchLineEnd` (GetTouchLineY): Function to determine the end Y-axis point of the touch line. Defaults to `defaultGetTouchLineEnd`. ``` -------------------------------- ### RadarChartDataTween Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/RadarChartDataTween/RadarChartDataTween.html Initializes a RadarChartDataTween with the starting and ending RadarChartData for the animation. This is used to tween between two different radar chart configurations. ```dart RadarChartDataTween({ required RadarChartData begin, required RadarChartData end, }) : super(begin: begin, end: end); ``` -------------------------------- ### PieChartDataTween Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/PieChartDataTween/PieChartDataTween.html The PieChartDataTween constructor requires two PieChartData objects: 'begin' and 'end'. These represent the starting and ending states for the animation. ```APIDOC ## PieChartDataTween constructor ### Description Creates a PieChartDataTween with a specified begin and end PieChartData. ### Parameters #### Path Parameters - **begin** (PieChartData) - Required - The starting PieChartData for the tween. - **end** (PieChartData) - Required - The ending PieChartData for the tween. ``` -------------------------------- ### FlDotPainter Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/FlDotPainter/FlDotPainter.html Initializes a new instance of the FlDotPainter class. ```APIDOC ## FlDotPainter() ### Description Creates a new FlDotPainter instance. ### Constructor `const FlDotPainter()` ### Implementation ```dart const FlDotPainter(); ``` ``` -------------------------------- ### BarChartDataTween Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/BarChartDataTween/BarChartDataTween.html Initializes a BarChartDataTween with the starting and ending BarChartData for the animation. This is used to tween between two different chart data configurations. ```dart BarChartDataTween({required BarChartData begin, required BarChartData end}) : super(begin: begin, end: end); ``` -------------------------------- ### LineTouchTooltipData Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/LineTouchTooltipData-class.html Initializes a LineTouchTooltipData object with various customization options for the tooltip's appearance and behavior. ```APIDOC ## LineTouchTooltipData Constructor ### Description Initializes a LineTouchTooltipData object with various customization options for the tooltip's appearance and behavior. ### Parameters - **tooltipBorderRadius** (BorderRadius?): Sets a rounded radius for the tooltip. - **tooltipPadding** (EdgeInsets): Applies a padding for showing contents inside the tooltip. Defaults to `EdgeInsets.symmetric(horizontal: 16, vertical: 8)`. - **tooltipMargin** (double): Applies a bottom margin for showing tooltip on top of rods. Defaults to `16`. - **tooltipHorizontalAlignment** (FLHorizontalAlignment): Controls showing tooltip on left side, right side or center aligned with spot. Defaults to `FLHorizontalAlignment.center`. - **tooltipHorizontalOffset** (double): Applies horizontal offset for showing tooltip. Defaults to `0`. - **maxContentWidth** (double): Restricts the tooltip's width. Defaults to `120`. - **getTooltipItems** (GetLineTooltipItems): Retrieves data for showing content inside the tooltip. Defaults to `defaultLineTooltipItem`. - **getTooltipColor** (GetLineTooltipColor): Callback to determine the background color of the tooltip. Defaults to `defaultLineTooltipColor`. - **fitInsideHorizontally** (bool): Forces the tooltip to shift horizontally inside the chart, if overflow happens. Defaults to `false`. - **fitInsideVertically** (bool): Forces the tooltip to shift vertically inside the chart, if overflow happens. Defaults to `false`. - **showOnTopOfTheChartBoxArea** (bool): Forces the tooltip container to top of the line. Defaults to `false`. - **rotateAngle** (double): Controls the rotation of the tooltip. Defaults to `0.0`. - **tooltipBorder** (BorderSide): The tooltip border color. Defaults to `BorderSide.none`. ``` -------------------------------- ### LineBarSpot Constructor Implementation Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/LineBarSpot/LineBarSpot.html Initializes a LineBarSpot with its parent bar, the bar's index, and the FlSpot data. It also calculates the spot's index within the bar's list of spots. ```dart LineBarSpot( this.bar, this.barIndex, FlSpot spot, ) : spotIndex = bar.spots.indexOf(spot), super(spot.x, spot.y); ``` -------------------------------- ### Get Scatter Tooltip Items Property Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/ScatterTouchTooltipData/getTooltipItems.html This property is of type GetScatterTooltipItems and is used to retrieve data for showing content inside the tooltip. ```dart final GetScatterTooltipItems getTooltipItems; ``` -------------------------------- ### FlLine Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/FlLine-class.html Initializes a new FlLine with specified color, gradient, stroke width, and dash array. ```APIDOC ## FlLine({Color? color, Gradient? gradient, double strokeWidth = 2, List? dashArray}) Renders a line, color it by `color`, thickness is defined by `strokeWidth`, and if you want to have dashed line, you should fill `dashArray`, it is a circular array of dash offsets and lengths. For example, the array `[5, 10]` would result in dashes 5 pixels long followed by blank spaces 10 pixels long. ``` -------------------------------- ### Get ScatterChartData size Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/ScatterSpot/size.html Access the size property to retrieve the dimensions of the scatter plot. This is determined by the dotPainter's getSize method. ```dart Size get size => dotPainter.getSize(this); ``` -------------------------------- ### RadarEntry Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/RadarEntry/RadarEntry.html Initializes a new RadarEntry with a required value. ```APIDOC ## RadarEntry Constructor ### Description Creates a new RadarEntry instance. ### Parameters #### Path Parameters - **value** (double) - Required - The value for this entry on the radar chart. ``` -------------------------------- ### BarChartRodData fromY Property Declaration Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/BarChartRodData/fromY.html This snippet shows the declaration of the `fromY` property for `BarChartRodData`. It is used to specify the starting Y-coordinate for rendering a bar. ```dart final double fromY; ``` -------------------------------- ### FlGridData Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/FlGridData-class.html Initializes FlGridData with options for showing grids, drawing horizontal and vertical lines, and defining intervals and custom drawing logic. ```APIDOC ## FlGridData ### Description Responsible for rendering grid lines behind the content of charts. The `show` parameter determines whether all grids are shown or hidden. ### Parameters - **show** (bool) - Optional - Determines showing or hiding all horizontal and vertical lines. - **drawHorizontalLine** (bool) - Optional - Determines showing or hiding all horizontal lines. - **horizontalInterval** (double?) - Optional - Determines the interval between horizontal lines. If null, it will be auto-calculated. - **getDrawingHorizontalLine** (GetDrawingGridLine) - Optional - A function that provides a `FlLine` object representing the specified horizontal line based on its y-value. - **checkToShowHorizontalLine** (CheckToShowGrid) - Optional - A function that determines whether to show a specified horizontal line based on its y-value. - **drawVerticalLine** (bool) - Optional - Determines showing or hiding all vertical lines. - **verticalInterval** (double?) - Optional - Determines the interval between vertical lines. If null, it will be auto-calculated. - **getDrawingVerticalLine** (GetDrawingGridLine) - Optional - A function that provides a `FlLine` object representing the specified vertical line based on its x-value. - **checkToShowVerticalLine** (CheckToShowGrid) - Optional - A function that determines whether to show a specified vertical line based on its x-value. ``` -------------------------------- ### FlLabel Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/FlLabel/FlLabel.html Initializes a new FlLabel instance with optional parameters for display customization. ```APIDOC ## FlLabel Constructor ### Description Creates a new FlLabel with customizable properties such as visibility, text, style, angle, and text direction. ### Parameters - **show** (bool) - Optional - Determines if the label should be displayed. Defaults to true. - **text** (String) - Optional - The text content of the label. Defaults to an empty string. - **style** (TextStyle?) - Optional - The text style for the label. - **angle** (double) - Optional - The rotation angle of the label in degrees. Defaults to 0. - **textDirection** (TextDirection) - Optional - The text direction for rendering the label. Defaults to TextDirection.ltr. ``` -------------------------------- ### DefaultCandlestickPainter Props Override Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/DefaultCandlestickPainter/props.html Overrides the get props method to return a list of properties used for equality checks. This specific implementation includes 'candlestickStyleProvider'. ```dart @override List get props => [ candlestickStyleProvider, ]; ``` -------------------------------- ### BarTouchData Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/BarTouchData-class.html Initializes BarTouchData with various touch handling configurations. You can disable or enable the touch system using the 'enabled' flag. ```APIDOC ## BarTouchData ### Description Initializes BarTouchData with various touch handling configurations. ### Parameters - **enabled** (bool?) - Optional - Determines if the touch system is enabled. - **touchCallback** (BaseTouchCallback?) - Optional - Callback for touch events. - **mouseCursorResolver** (MouseCursorResolver?) - Optional - Resolves mouse cursor based on touch events. - **longPressDuration** (Duration?) - Optional - Duration for long press gesture. - **touchTooltipData** (BarTouchTooltipData?) - Optional - Configuration for touch tooltips. - **touchExtraThreshold** (EdgeInsets?) - Optional - Threshold for handling touch events. - **allowTouchBarBackDraw** (bool?) - Optional - Determines if touch events on the back draw bar are handled. - **handleBuiltInTouches** (bool?) - Optional - Determines if built-in touch responses (like tooltips) are handled. ``` -------------------------------- ### fromY Property Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/BackgroundBarChartRodData/fromY.html The `fromY` property specifies the starting vertical position (Y-coordinate) where the background color of the bar chart rod begins to be applied. It is a `double` value. ```APIDOC ## fromY Property ### Description The `fromY` property determines the starting point on the Y-axis from which the background color of a bar chart rod will be rendered. This allows for partial background coloring based on specific Y-values. ### Type `double` ### Implementation ```dart final double fromY; ``` ### Usage Example ```dart BackgroundBarChartRodData( fromY: 10.0, // Background starts to show from Y=10.0 // ... other properties ) ``` ``` -------------------------------- ### FlTouchData Constructor Implementation Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/FlTouchData/FlTouchData.html This snippet shows the implementation of the FlTouchData constructor, which initializes the touch system's properties. ```dart const FlTouchData( this.enabled, this.touchCallback, this.mouseCursorResolver, this.longPressDuration, ); ``` -------------------------------- ### Get Touch Line End Property Declaration Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/LineTouchData/getTouchLineEnd.html This snippet shows the declaration of the getTouchLineEnd property, which is of type GetTouchLineY. It defines the endpoint on the y-axis for touch interactions. ```dart final GetTouchLineY getTouchLineEnd; ``` -------------------------------- ### BarAreaData Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/BarAreaData-class.html Initializes a BarAreaData object. If `show` is true, LineChart fills the area above and below each line with a color or gradient. ```APIDOC ## BarAreaData Constructor ### Description Initializes a BarAreaData object. If `show` is true, LineChart fills the area above and below each line with a color or gradient. ### Parameters - **show** (bool) - Optional - If true, enables area filling. - **color** (Color?) - Optional - The color to fill the area. Cannot be provided with `gradient`. - **gradient** (Gradient?) - Optional - The gradient to fill the area. Cannot be provided with `color`. - **spotsLine** (BarAreaSpotsLine) - Optional - Configuration for drawing lines from spots. - **cutOffY** (double) - Optional - The y-value to cut off the drawing above or below the area. - **applyCutOffY** (bool) - Optional - Determines whether to apply the `cutOffY` value. ``` -------------------------------- ### FlSpot zero constant definition Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/FlSpot/zero-constant.html Defines a static constant FlSpot with x and y values set to 0. Use this for a quick way to get a zero-value FlSpot. ```dart static const FlSpot zero = FlSpot(0, 0); ``` -------------------------------- ### LineTouchTooltipData Constructor Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/LineTouchTooltipData/LineTouchTooltipData.html Initializes a LineTouchTooltipData object with customizable tooltip properties. This constructor allows for fine-grained control over the tooltip's appearance, including border radius, padding, margin, alignment, maximum width, and how the tooltip content is generated and colored. It also provides options to control the tooltip's position relative to the chart and its rotation. ```APIDOC ## LineTouchTooltipData() ### Description Constructs a LineTouchTooltipData object to customize the appearance and behavior of line chart tooltips. ### Parameters - **tooltipBorderRadius** (BorderRadius?): The border radius of the tooltip. - **tooltipPadding** (EdgeInsets): The padding inside the tooltip. Defaults to `EdgeInsets.symmetric(horizontal: 16, vertical: 8)`. - **tooltipMargin** (double): The bottom margin of the tooltip. Defaults to `16`. - **tooltipHorizontalAlignment** (FLHorizontalAlignment): The horizontal alignment of the tooltip. Defaults to `FLHorizontalAlignment.center`. - **tooltipHorizontalOffset** (double): An offset to adjust the horizontal position of the tooltip. Defaults to `0`. - **maxContentWidth** (double): The maximum width of the tooltip content. Defaults to `120`. - **getTooltipItems** (GetLineTooltipItems): A callback function to generate the tooltip items. Defaults to `defaultLineTooltipItem`. - **getTooltipColor** (GetLineTooltipColor): A callback function to determine the tooltip's background color. Defaults to `defaultLineTooltipColor`. - **fitInsideHorizontally** (bool): Whether to force the tooltip to fit inside the chart horizontally. Defaults to `false`. - **fitInsideVertically** (bool): Whether to force the tooltip to fit inside the chart vertically. Defaults to `false`. - **showOnTopOfTheChartBoxArea** (bool): Whether to show the tooltip on top of the chart box area. Defaults to `false`. - **rotateAngle** (double): The rotation angle for the tooltip. Defaults to `0.0`. - **tooltipBorder** (BorderSide): The border side for the tooltip. Defaults to `BorderSide.none`. ``` -------------------------------- ### Default Get Title Implementation Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/defaultGetTitle.html This is the default implementation for the SideTitles.getTitlesWidget function. It formats the axis number to a shorter string using `formatNumber` and displays it within a Text widget. ```dart Widget defaultGetTitle(double value, TitleMeta meta) { return SideTitleWidget( meta: meta, child: Text( meta.formattedValue, ), ); } ``` -------------------------------- ### Get Candlestick Tooltip Color Declaration Source: https://pub.dev/documentation/fl_chart/latest/fl_chart/CandlestickTouchTooltipData/getTooltipColor.html This snippet shows the declaration of the getTooltipColor property, which is of type GetCandlestickTooltipColor. It is used to retrieve data for the candlestick chart's tooltip. ```dart final GetCandlestickTooltipColor getTooltipColor; ```