Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LineChart] Proposal: TooltipItem with Widget child. #72

Open
jamesblasco opened this issue Sep 28, 2019 · 25 comments
Open

[LineChart] Proposal: TooltipItem with Widget child. #72

jamesblasco opened this issue Sep 28, 2019 · 25 comments
Labels
enhancement New feature or request Fundamental

Comments

@jamesblasco
Copy link
Contributor

jamesblasco commented Sep 28, 2019

Tooltips in line chart are a really cool feature, but would be even cooler if we could customize it a bit more.

Making the child a widget become very versatile. It would allow to add a title with a custom style below the spot value or even an image.

Proposal Now
Captura de pantalla 2019-09-28 a las 11 54 37 Captura de pantalla 2019-09-28 a las 11 54 37
@imaNNeo
Copy link
Owner

imaNNeo commented Sep 28, 2019

Hi, currently the tooltip is drawn by the canvas,
but we can handle it by a widget.
stay tuned!

@imaNNeo imaNNeo added the enhancement New feature or request label Sep 28, 2019
@Ntu-odo
Copy link

Ntu-odo commented Nov 18, 2020

Hi there ! That feature could really make this package one of the best available, I'm currently looking for this feature for my company, do you have any idea when we could expect this to be released ?

@DinithHerath
Copy link

Hi,
Can you implement this feature as soon as possible. Our company also need this.
Thanks for the hard work you are doing.

@imaNNeo
Copy link
Owner

imaNNeo commented Apr 1, 2021

Hi, check out our new release: 0.35.0

children property added in the LineTooltipItem, BarTooltipItem and ScatterTooltipItem which accepts a list of TextSpan. It allows you to have more customized texts inside the tooltip.

Check below examples:

BarChartSample 1 (Source Code)

ScatterChartSample 2 (Source Code)

@imaNNeo imaNNeo closed this as completed Apr 1, 2021
@WillowWisp
Copy link

@imaNNeoFighT sorry for tagging you in but, the children property still doesn't allow us to pass a Widget into the tooltip since it only accepts List<TextSpan>

For example, we still cannot achieve a tooltip that looks like this.
image

Is it possible to change the children type from List<TextSpan> to List<InlineSpan> so that we can pass in a WidgetSpan?
Thank you for the cool package btw. It helps a lot!

@P-B1101
Copy link

P-B1101 commented May 18, 2021

Hi and thank you for your great work.
I wonder can u add border for tooltip?

@imaNNeo
Copy link
Owner

imaNNeo commented May 27, 2021

@WillowWisp you're right. It only allows you to put List in the children.

BTW supporting widgets is an open issue that we are thinking about.
It is related to #183.

I re-open this issue to follow custom widgets.

@imaNNeo imaNNeo reopened this May 27, 2021
@imaNNeo
Copy link
Owner

imaNNeo commented May 27, 2021

@P-B1101 please search in issues and if there isn't any already opened issue, make a separate issue to follow border on tooltips.

Thanks!

@eduardothiesen
Copy link

@devasidmi
Copy link

devasidmi commented Jan 9, 2022

@imaNNeoFighT Hey, great package! Any updates or workarounds on custom Widget as child for tooltips?

@demoYang
Copy link

how to custom LineTooltipItem ?

@FriendlyNeighbor
Copy link

no updates on this yet?

@noinskit
Copy link

FTR I also needed this feature to draw colored icons over some chart bars and I managed to work it around by putting the icons into a custom font using FontLab (if anybody tries that - it needs to be CBDT, it took me some time to figure out that OT+SVG does not work in Flutter and/or Android 🤷).

@sgshivamgarg8
Copy link

Any updates?
I want to show Icons or Images over bar rods.

I tried to do this in getTooltipItem but it expects BarTooltipItem which only allows text.

@biklas7
Copy link

biklas7 commented Nov 21, 2022

@imaNNeoFighT sorry to tag you, first of all, thanks for the amazing package. Just wanted to ask if this feature is in the roadmap for the next releases?

@durannumit
Copy link

Hey everyone, I definitely need this feature and everyone waiting on next release. I implemented my custom tooltip a bit hacky way. Firstly, I created an overlay widget I wrap BarChart widget with Listener and I'm listening barTouchData which index bar touched.

 Listener(
                        onPointerUp: (event) {
                          overlayEntry?.remove();
                        },
                        onPointerMove: (event) {
                        // show Overlay on the specific index;
                        },
                        onPointerDown: (event) {
                        // show Overlay on the specific index;
                        },
                        child: BarChart(
                          BarChartData(
                            ....
                            barTouchData: BarTouchData(
                              touchCallback: ((p0, p1) {
                                //update touched bar index
                             ....
                               },
                              ),
                            ),
                          ),
                        ),
                      ),

I know it's not the best way but it's working and useful for now. Maybe this can be helpful 💪🏻

@omar-hanafy
Copy link

Yes it is a cool feature to have custom tooltip widget, I can't even add simple elevation to my tooltip 😕.

@d3xt3r2909
Copy link

Really needed feature..

@Sumit258000
Copy link

Any plans for this implementations @imaNNeo

@jebstern
Copy link

Is the maintainer waiting for community to implement this? This issue is over 4 years old.

@dagovalsusa
Copy link

+1

@tfitzke
Copy link

tfitzke commented Oct 27, 2023

I would greatly appreciate it if you could provide information regarding the roadmap for this feature. Additionally, I am interested in knowing if there are opportunities for community contributions!

@imaNNeo
Copy link
Owner

imaNNeo commented Nov 11, 2023

I would greatly appreciate it if you could provide information regarding the roadmap for this feature. Additionally, I am interested in knowing if there are opportunities for community contributions!

Hi @tfitzke,
There is no roadmap, unfortunately. This is my side-project and I only contribute in my free-times.
I wish I could work full-time on it, but I can't.
Contributions are always welcome. Check the guideline as a starting point.

@tfitzke
Copy link

tfitzke commented Nov 22, 2023

I would greatly appreciate it if you could provide information regarding the roadmap for this feature. Additionally, I am interested in knowing if there are opportunities for community contributions!

Hi @tfitzke, There is no roadmap, unfortunately. This is my side-project and I only contribute in my free-times. I wish I could work full-time on it, but I can't. Contributions are always welcome. Check the guideline as a starting point.

Hey @imaNNeo
Thank you for your answer!
Then I will gladly try to contribute as soon as I can :)

@egonbeermat
Copy link

Would love if this great package supported adding WidgetSpan to the tooltip TextSpan list for bar charts and other types. Currently throws an error. Solutions to this issue have been discussed here for the same issue in the AutoSizeText package:

WidgetSpan causes an error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Fundamental
Projects
None yet
Development

No branches or pull requests