BaseChart
FlBorderData
Determines whether to show or hide the border.
FlTitlesData
Determines whether to show or hide the titles around the chart.
leftTitlesAxisTitles#defaultconst AxisTitles(sideTitles: SideTitles(reservedSize: 44, showTitles: true))Holds data to draw the titles on the left side of the chart,
see AxisTitles.
topTitlesAxisTitles#defaultconst AxisTitles(sideTitles: SideTitles(reservedSize: 30, showTitles: true))Holds data to draw the titles on the top side of the chart,
see AxisTitles.
rightTitlesAxisTitles#defaultconst AxisTitles(sideTitles: SideTitles(reservedSize: 44, showTitles: true))Holds data to draw the titles on the right side of the chart,
see AxisTitles.
bottomTitlesAxisTitles#defaultconst AxisTitles(sideTitles: SideTitles(reservedSize: 30, showTitles: true))Holds data to draw the titles on the bottom side of the chart,
see AxisTitles.
AxisTitles
It shows the name of axis, for example your x-axis shows year,
then you might want to show it using axisNameWidget property as a widget
Determines the size of axisNameWidget.
It is responsible to show your axis side labels.
If titles are showing on top of your tooltip, you can draw them below everything.
In the future, we will convert tooltips to a widget, that would solve this problem.
Where the SideTitles are drawn in relation to the chart.
SideTitles
Determines showing or hiding this side titles
You can override it to pass your custom widget to show in each axis value
We recommend you to use SideTitleWidget.
If you decide to implement your custom widget
(instead of SideTitleWidget), you have to take care of the alignment,
space to the chart and also the rotation (if you are rotating the chart,
for example for Horizontal Bar Chart)
It determines the maximum space that your titles need, (All titles will stretch using this value)
Texts are showing with provided interval. If you don't provide anything,
we try to find a suitable value to set as interval under the hood.
If true (default), a title for the minimum data value is included independent of the sampling interval
If true (default), a title for the maximum data value is included independent of the sampling interval
SideTitleFitInsideData
Whether to enable fit inside to SideTitleWidget
The position (in pixel) that applied to the child widget along its corresponding axis.
Parent axis max width/height
Distance between child widget and its closest corresponding axis edge
FlGridData
Determines showing or hiding all horizontal and vertical lines.
Determines showing or hiding all horizontal lines.
Determines interval between horizontal lines, left it null to be auto calculated.
Gives you a y value, and gets a FlLine that represents specified line.
Gives you a y value, and gets a boolean that determines showing or hiding specified line.
Determines showing or hiding all vertical lines.
Determines interval between vertical lines, left it null to be auto calculated.
Gives you a x value, and gets a FlLine that represents specified line.
Gives you a x value, and gets a boolean that determines showing or hiding specified line.
FlLabel
Whether the label is visible.
The text content of the label.
The text style of the label.
When null (or when its inherit is true), it is merged with the ambient
DefaultTextStyle, and it respects the bold text setting of the platform.
Rotation angle of the label in degrees.
Text direction of the label.
FlSpot
The x value of the spot, on the horizontal axis (from left to right).
The y value of the spot, on the vertical axis (from bottom to top).
The error range of the spot on the x axis, drawn by the
errorIndicatorData of the chart, see FlErrorRange.
The error range of the spot on the y axis, drawn by the
errorIndicatorData of the chart, see FlErrorRange.
FlLine
Defines color of the line.
Defaults to Colors.black if neither color nor gradient is provided.
Defines the gradient of the line.
Defines thickness of the line.
Defines dash effect of the line.
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.
TouchedSpot
Represents the spot inside our axis based chart, 0, 0 is bottom left, and 1, 1 is top right.
Represents the touch position in device pixels, 0, 0 is top, left, and 1, 1 is bottom right.
RangeAnnotations
Horizontal ranges to highlight, see HorizontalRangeAnnotation.
Vertical ranges to highlight, see VerticalRangeAnnotation.
HorizontalRangeAnnotation
Determines starting point in vertical (y) axis.
Determines ending point in vertical (y) axis.
If provided, this HorizontalRangeAnnotation draws with this color
Otherwise we use gradient to draw the background.
It draws with gradient if you provide both color and gradient.
If none is provided, it draws with a white color.
If provided, this HorizontalRangeAnnotation draws with this gradient
Otherwise we use color to draw the background.
It draws with gradient if you provide both color and gradient.
If none is provided, it draws with a white color.
VerticalRangeAnnotation
Determines starting point in horizontal (x) axis.
Determines ending point in horizontal (x) axis.
If provided, this VerticalRangeAnnotation draws with this color
Otherwise we use gradient to draw the background.
It draws with gradient if you provide both color and gradient.
If none is provided, it draws with a white color.
If provided, this VerticalRangeAnnotation draws with this gradient
Otherwise we use color to draw the background.
It draws with gradient if you provide both color and gradient.
If none is provided, it draws with a white color.
FlTouchEvent
Base class for all supported touch/pointer events.
| PropName | Description | Inspired from |
|---|---|---|
| FlPanDownEvent | Contains information of happened touch gesture | GestureDragDownCallback |
| FlPanStartEvent | When a pointer has contacted the screen and has begun to move. | GestureDragStartCallback |
| FlPanUpdateEvent | When a pointer that is in contact with the screen and moving has moved again. | GestureDragUpdateCallback |
| FlPanCancelEvent | When the pointer that previously triggered a FlPanStartEvent did not complete. | GestureDragCancelCallback |
| FlPanEndEvent | When a pointer that was previously in contact with the screen and moving is no longer in contact with the screen. | GestureDragEndCallback |
| FlTapDownEvent | When a pointer that might cause a tap has contacted the screen. | GestureTapDownCallback |
| FlTapCancelEvent | When the pointer that previously triggered a FlTapDownEvent will not end up causing a tap. | GestureTapCancelCallback |
| FlTapUpEvent | When a pointer that will trigger a tap has stopped contacting the screen. | GestureTapUpCallback |
| FlSecondaryTapDownEvent | When a secondary pointer that might cause a tap has contacted the screen. | GestureTapDownCallback |
| FlSecondaryTapCancelEvent | When the secondary pointer that previously triggered a FlSecondaryTapDownEvent will not end up causing a tap. | GestureTapCancelCallback |
| FlSecondaryTapUpEvent | When a secondary pointer that will trigger a tap has stopped contacting the screen. | GestureTapUpCallback |
| FlLongPressStart | Called When a pointer has remained in contact with the screen at the same location for a long period of time. | GestureLongPressStartCallback |
| FlLongPressMoveUpdate | When a pointer is moving after being held in contact at the same location for a long period of time. Reports the new position and its offset from the original down position. | GestureLongPressMoveUpdateCallback |
| FlLongPressEnd | When a pointer stops contacting the screen after a long press gesture was detected. Also reports the position where the pointer stopped contacting the screen. | GestureLongPressEndCallback |
| FlSecondaryLongPressStart | Called when a secondary pointer has remained in contact with the screen at the same location for a long period of time. | GestureLongPressStartCallback |
| FlSecondaryLongPressMoveUpdate | When a secondary pointer is moving after being held in contact at the same location for a long period of time. Reports the new position and its offset from the original down position. | GestureLongPressMoveUpdateCallback |
| FlSecondaryLongPressEnd | When a secondary pointer stops contacting the screen after a long press gesture was detected. Also reports the position where the pointer stopped contacting the screen. | GestureLongPressEndCallback |
| FlPointerEnterEvent | The pointer has moved with respect to the device while the pointer is or is not in contact with the device, and it has entered our chart. | PointerEnterEventListener |
| FlPointerHoverEvent | The pointer has moved with respect to the device while the pointer is not in contact with the device. | PointerHoverEventListener |
| FlPointerExitEvent | The pointer has moved with respect to the device while the pointer is or is not in contact with the device, and exited our chart. | PointerExitEventListener |
ExtraLinesData
Horizontal lines to draw on the chart, see HorizontalLine.
Vertical lines to draw on the chart, see VerticalLine.
If true, the extra lines are drawn above the data of the chart, otherwise below it.
HorizontalLine
Draws from left to right of the chart using the y value.
Draws a text label over the line.
Defines color of the line.
Defaults to Colors.black if neither color nor gradient is provided.
Defines the gradient of the line.
Defines thickness of the line.
Defines dash effect of the line.
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.
Use it for any kind of image, to draw it in left side of the chart.
Use it for vector images, to draw it in left side of the chart.
if not drawing dash line, then this is the StrokeCap for the line. i.e. if the two ends of the line is round or butt or square.
VerticalLine
Draws from bottom to top of the chart using the x value.
Draws a text label over the line.
Defines color of the line.
Defaults to Colors.black if neither color nor gradient is provided.
Defines the gradient of the line.
Defines thickness of the line.
Defines dash effect of the line.
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.
Use it for any kind of image, to draw it in bottom side of the chart.
Use it for vector images, to draw it in bottom side of the chart.
if not drawing dash line, then this is the StrokeCap for the line. i.e. if the two ends of the line is round or butt or square.
SizedPicture
Is the showing image.
width of our picture.
height of our picture.
HorizontalLineLabel
Inner spaces around the drawing text.
Sets style of the drawing text.
Aligns the text on the line.
Determines showing label or not.
Determines the direction of the text.
Resolves a label for showing.
VerticalLineLabel
Inner spaces around the drawing text.
styleTextStyle?#defaultconst TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: 14)Sets style of the drawing text.
Aligns the text on the line.
Determines showing label or not.
Determines the direction of the text.
Resolves a label for showing.
FLHorizontalAlignment
center#Element shown horizontally center aligned to a given point.
left#Element shown on the left side of the given point.
right#Element shown on the right side of the given point.
FlErrorIndicatorData
Determines showing the error indicator or not
A callback that allows you to return a FlSpotErrorRangePainter
per each data point (for example FlSpot in line chart)
FlErrorRange
determines the lower bound of the error range, it will be subtracted from the main value. So it is non-negative and it is relative to the main value
determines the upper bound of the error range, it will be added to the main value. So it is non-negative and it is relative to the main value
AxisSpotIndicator
The x value where the indicator is drawn.
The y value where the indicator is drawn.
Draws the indicator, like AxisLinesIndicatorPainter (you can implement
your own AxisSpotIndicatorPainter to customize it).