ScatterChart(
ScatterChartData(
// read about it in the below section
),
);
PropName | Description | default value |
---|---|---|
scatterSpots | list of ScatterSpot to show the scatter spots on the chart | [] |
titlesData | check the FlTitlesData | FlTitlesData() |
axisTitleData | check the FlAxisTitleData | FlAxisTitleData() |
scatterTouchData | ScatterTouchData holds the touch interactivity details | ScatterTouchData() |
showingTooltipIndicators | indices of showing tooltip | [] |
PropName | Description | default value |
---|---|---|
show | determines to show or hide the spot | true |
radius | radius of the showing spot | [8] |
color | colors of the spot | // a color based on the values |
ScatterTouchData (read about touch handling)
PropName | Description | default value |
---|---|---|
enabled | determines to enable or disable touch behaviors | true |
touchTooltipData | a ScatterTouchTooltipData, that determines how show the tooltip on top of touched spot (appearance of the showing tooltip bubble) | ScatterTouchTooltipData() |
touchSpotThreshold | the threshold of the touch accuracy | 10 |
handleBuiltInTouches | set this true if you want the built in touch handling (show a tooltip bubble and an indicator on touched spots) | true |
touchCallback | listen to this callback to retrieve touch events, it gives you a ScatterTouchResponse | null |
PropName | Description | default value |
---|---|---|
tooltipBgColor | background color of the tooltip bubble | Colors.white |
tooltipRoundedRadius | background corner radius of the tooltip bubble | 4 |
tooltipPadding | padding of the tooltip | EdgeInsets.symmetric(horizontal: 16, vertical: 8) |
maxContentWidth | maximum width of the tooltip (if a text row is wider than this, then the text breaks to a new line | 120 |
getTooltipItems | a callback that retrieve a ScatterTooltipItem by the given ScatterSpot | defaultScatterTooltipItem |
fitInsideHorizontally | forces tooltip to horizontally shift inside the chart's bounding box | false |
fitInsideVertically | forces tooltip to vertically shift inside the chart's bounding box | false |
PropName | Description | default value |
---|---|---|
text | text string of each row in the tooltip bubble | null |
textStyle | TextStyle of the showing text row | null |
bottomMargin | bottom margin of the tooltip (to the top of most top spot) | radius / 2 |
PropName | Description | default value |
---|---|---|
touchedSpot | touched ScatterSpot | null |
touchedSpotIndex | index of touched ScatterSpot | null |
touchInput | a FlTouchInput that is the touch behaviour | null |