Draft: add FlDotImagePainter for custom image dot markers #2049
+192
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🚧 Draft: Add FlDotImagePainter for custom image dot markers
Status: Work in Progress - Seeking early feedback
Description
This PR adds
FlDotImagePainter, a new implementation ofFlDotPainterthat allows users to display custom images as dot markers on line charts, instead of the default circle, square, or cross shapes.Motivation
Currently, fl_chart only supports basic geometric shapes for dot markers. Many users want to display custom icons or images (e.g., profile pictures, product icons) as data point markers.
Screenshots
Implementation Details
Core Changes
FlDotImagePainterclass (lib/src/chart/base/axis_chart/axis_chart_data.dart)FlDotPainterto support image renderingloadImageFromAsset()helper for loading imagesdraw()methodExample
LineChartSample14demonstrates the usageUsage Example
Related Issue
[Feature Request] Add FlDotImagePainter to support custom image dot markers