Tooltip - Dash Plotly DataTable

Поділитися
Вставка
  • Опубліковано 14 жов 2024

КОМЕНТАРІ • 46

  • @KamleshParihar
    @KamleshParihar 2 роки тому

    Thanku so much dear. I generally dont comment, but your efforts are great. The only help available on youtube about dash are your videos and they all are excellent. Thanks for helping the community.

  • @viktorgoa
    @viktorgoa 3 роки тому +1

    you have no idea how much you have helped me out with these videos. You're such a Dash wizard, my dashboard looks so nice and dynamic

    • @CharmingData
      @CharmingData  3 роки тому

      I'm glad to hear @Viktorgoa. Thanks for watching ❤️

  • @allanmathews2093
    @allanmathews2093 3 роки тому +2

    It is like you are reading my mind, I just thought about tool tip feature and here it is.. Thanks Adam I'm your fan as always

    • @CharmingData
      @CharmingData  3 роки тому

      Thank you, Allan. I'm glad it hit the spot 👍

    • @allanmathews2093
      @allanmathews2093 3 роки тому

      @@CharmingData one question Adam from tooltip_data how to implement it using callbacks?? (Challenge here:when df created within a callback we don't use df.to_dict(records) in the layout)

    • @CharmingData
      @CharmingData  3 роки тому

      @@allanmathews2093 HI Allan, can you please expand/clarify the question. Is it not possible to implement the tooltip_data in the layout section of the app? You prefer only calling and activating the tooltip_data in a callback?

  • @fatalmokrane
    @fatalmokrane 3 роки тому

    Thanks for every video you posted on dash.

    • @CharmingData
      @CharmingData  3 роки тому +1

      you're welcome @ghilesfreeman. Good luck with the dashboards apps you create

  • @uzomauzosike3528
    @uzomauzosike3528 3 роки тому +1

    Keep up the great job. Thanks for the details and guidance your videos provide. Would you please consider showing how components can be reset to default values, and plots cleared probably by use of a reset button without having to refresh the entire page. I read this was somehow possible with Events which is now deprecated. Many thanks to you

  • @VijaykumarS7
    @VijaykumarS7 3 роки тому +1

    Thanks a lot sir

  • @leonardomolina8958
    @leonardomolina8958 3 роки тому

    Nice name of your cat: Chapulin. Thanks for the tutorial. Very good tip to format a string with Markdown to place a gif at 18:10. Really, the possibilities are many with Dash. Please, hopefully in a future tutorial you can touch the topic of making a graph (nodes and edges) with Plotly.

    • @CharmingData
      @CharmingData  3 роки тому +1

      Hi Leonardo, are you referring to these kind of graphs? dash.plotly.com/cytoscape

    • @leonardomolina8958
      @leonardomolina8958 3 роки тому

      ​@@CharmingData, yes. I didn't know dash_cytoscape. I've only seen examples of graphs in Dash but starting from go.Scatter on Medium, but never from cytoscape. I will check it. Thanks a lot!

    • @CharmingData
      @CharmingData  3 роки тому

      @@leonardomolina8958 I think you would love it. It's also very powerful. I'll do an introduction to cytoscape in one of my tutorials.

  • @irisvanbussel975
    @irisvanbussel975 3 роки тому

    Thank you for the great tutorials. Been working on a POC in Dash Plotly for work and your tutorials have helped me enormously.
    One question I cannot really find an easy answer to if if it's possible to create a sort of viz in tooltip (such as a simple table).
    If it is possible, would be nice to have a tutorial on that as well!

    • @CharmingData
      @CharmingData  3 роки тому

      I don't think that's possible Iris.

  • @richwiss
    @richwiss 3 роки тому

    These videos are great! But what editor is that you are using?

  • @lucasbrecht9296
    @lucasbrecht9296 Рік тому

    Great!!! This video helped me to undestand better this tool, but there's one thing I'am not being abble to do with the tooltip. When I apply a callback as a filter (using an dropdown), the whole dash works fine but the tooltip doesn't, for some reason, when the filter is applied the data still from the dict before the filter.
    I have the callback using the id from the table, would I need to apply a new callback for the tootip dict? If so, how would I do it if the tooltip is already inside the dash_table.DataTable (that has an id as well)?

    • @CharmingData
      @CharmingData  Рік тому

      hi Lucas, it's challenging to solve this without seeing the code. I highly recommend you post your question on the Plotly Forum where people can help. community.plotly.com/

  • @Qwex1992
    @Qwex1992 Рік тому

    Thank you for this great tutorial!
    But could you please help me with something: I need to be able to copy text that is in the tooltip. As of now, as soon as I move cursor from the cell, the tooltip disappears. Is there any way for it to stay?

  • @britanie3172
    @britanie3172 3 роки тому

    Great! Tutorial

  • @lucaschiqui
    @lucaschiqui 2 місяці тому

    Hi Adam, this is a great feature, but what happens if you have a very large table or a map with markers with tooltip styled? In those cases the app takes a lot to render and load. Is there a paremeter to set or I should try with clientside callbacks or sth like that?

    • @CharmingData
      @CharmingData  2 місяці тому

      Hi Lucas, what do you mean, what are trying to do exactly? Just so you know, I would recommend using Dash AG Grid. It's new and it's better than the DataTable

  • @kiliantheis2895
    @kiliantheis2895 3 роки тому +2

    Thanks for all these Dash Tutorials. They are very helpful!
    I'm facing one issue with the tooltips: I use the property tooltip_data to fill the tooltips for each cell with the content of the cell (because I want to see the full content in case of an ellipsis). This works perfectly fine as long as the datatable is neither sorted nor filtered. If it gets sorted or filtered, the tooltips are displayed in the wrong position, i.e., they are not sorted/filtered accordingly but they stay in the original position of the cell the belong to.
    Has anyone an idea how I could make the tooltips change position with their cells rather than staying at the original position? Many thanks in advance!

  • @diegomarshall375
    @diegomarshall375 3 роки тому +1

    Great videos as always , Can you make a video of how to export the data table as Csv or also a report in PDF 🙌🏻

  • @CharmingData
    @CharmingData  3 роки тому

    Happy holidays everyone,
    👉If you appreciate these tutorials or would like additional support with Dash Plotly, join me at: www.patreon.com/charmingdata
    To make it easier to follow along, don't forget to download the code here: github.com/Coding-with-Adam/Dash-by-Plotly/tree/master/DataTable/Tooltip

  • @amalmt7916
    @amalmt7916 3 роки тому +1

    Hello Adam, thank you for these videos, I am trying to use tool tip with a dash_table with pagination, the first page displays the tool tip perfectly however, for the newt pages, it begins to show tool top in different position do you have an idea about this problem

    • @CharmingData
      @CharmingData  3 роки тому +1

      Hi @Amàl. It might be a bug. Try to create a post on the topic at Plotly forum

    • @sharathkumar3734
      @sharathkumar3734 2 роки тому

      Hi Amal, I am here facing the same problem ,it's been a year did it get solved ,if it is can I get some help

    • @sharathkumar3734
      @sharathkumar3734 2 роки тому

      @@CharmingData do we have something on this?

    • @CharmingData
      @CharmingData  2 роки тому

      @@sharathkumar3734 hi Sharath. I don't recall seeing Amal reporting this bug in the Plotly forum. I recommend creating a new topic on the Polly forum and sharing an example code with the example tooltip error that can be replicated by other community members. That would help Plotly track that bug.

  • @MrDogbural
    @MrDogbural 3 роки тому

    can we make one search button on top of the table that dynamically searches like google search? also can we add a hyperlink to particular cell?

    • @CharmingData
      @CharmingData  3 роки тому

      hi @minki, Thank you for supporting my channel and my goal to help people build data analytic web apps in Python. As of now, there is no button on top of the datatable that can search strings in in the table dynamically; for now, there is the data filter that can be used on every column.
      And yes, you can add hyperlink to a particular cell. See the markdown section on this page: dash.plotly.com/datatable/typing
      You can add a link by using markdown

  • @amir_forooghi
    @amir_forooghi 3 роки тому +1

    like before watching :)

    • @CharmingData
      @CharmingData  3 роки тому +1

      Amir, what kind of dashboard apps are you creating?

    • @amir_forooghi
      @amir_forooghi 3 роки тому +1

      @@CharmingData I have created a candlestick chart app. I'm a stock trader. Now I want to optimize it and honestly you are better than dash documentation :) I really want to know more about dcc.store. If it is possible for you to elaborate it, it will be great.
      I really like your tutorials style. Those recaps at the end are great. Your explanations are easy to understand. Just keep it up. Even in stackoverflow it is not so easy to find someone that solve dash problems. But dash and plotly are so great and very modern looking compared to other packages such as matplotlib.
      Thanks again.

    • @CharmingData
      @CharmingData  3 роки тому +1

      @@amir_forooghi thanks @Amir. I appreciate it. I'll try to add dcc.store to my tutorial to-do list, but it might be a while. If you'd prefer, we can connect via zoom and I can explain store to you in a few minutes.

    • @amir_forooghi
      @amir_forooghi 3 роки тому

      @@CharmingData You are so generous. Please check your Email that you provided for business inquires.

  • @fatalmokrane
    @fatalmokrane 3 роки тому

    hi i tried this :
    tooltip_header={
    'prix_unitaire_f': 'Prix Unitaire
    ' + df['prix_unitaire_f'].describe().to_string()
    },
    on a numerical column to display real column name + the basic statistics
    The values are here but the display is weird, the linebreaks don't appear.
    Do you have any tip to correctly display the linebreaks ?
    Thanks

    • @fatalmokrane
      @fatalmokrane 3 роки тому

      Nevermind, i added the rule 'white-space:pre;' to the css=[{
      'selector':
      '.dash-table-tooltip',
      'rule':
      'background-color: #3d94f6; '
      'color: white;'
      'white-space:pre;'
      }],

    • @CharmingData
      @CharmingData  3 роки тому +1

      @@fatalmokrane Sorry for not getting back to you sooner. I have had a full day of meetings. I'm glad you solved it. A cool solution :)

  • @Juan89nx
    @Juan89nx 3 роки тому

    Hi, first of all, your tutorial Rocks!!! Excellent work.
    I'm having issues trying to update the tooltip through a callback, and I cannot find the solution in google, so, maybe you can help me.
    Thanks in advance
    The Code:
    @app.callback( [Output(component_id='table', component_property='data') ,Output("tooltip", "options") ],
    [
    Input('my-date-picker-range', 'start_date'),
    Input('my-date-picker-range', 'end_date'),
    Input('tipoDescuento-dropdown', 'value')
    ]
    )
    def update_table(start_date, end_date, value):
    if value == "DD":
    df_DescuentosDobles2 = df_DescuentosDobles.loc[start_date:end_date]
    dataFiltered= df_DescuentosDobles2.to_dict("records")
    elif value == "DC":
    df_DescuentosCumple2 = df_DescuentosCumple.loc[start_date:end_date]
    dataFiltered= df_DescuentosCumple2.to_dict("records")

    else:
    df_DescuentosMarca2 = df_DescuentosMarca.loc[start_date:end_date]
    dataFiltered= df_DescuentosMarca2.to_dict("records")
    tooltip_data=[
    {
    column: {'value': str(value), 'type': 'markdown'}
    for column, value in row.items()
    } for row in dataFiltered
    ],


    return dataFiltered , tooltip_data

  • @gw1284
    @gw1284 3 роки тому

    where to watch 9:30 steaming