Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QTCharts: use of tooltips

QTCharts: use of tooltips

Scheduled Pinned Locked Moved Solved QML and Qt Quick
1 Posts 1 Posters 593 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    marco_88
    wrote on last edited by
    #1

    Hello everybody.

    I'm doing a page with graphics in QML, which is loaded dynamically by calling an api, which gives a JSON response, which then fills the graphics.

    This part works, and I use as AXis X, a DateTimeAxis, and as Y a simple ValueAxis.

    I have a situation like this:

    a0830744-1e50-486c-a62c-640c7d3bd23d-immagine.png

    The problem concerns the tooltips: when I open the graph I show the date and value of the last value of the graph and this thing works, but the problem is that when I click on a point of the graph, it is not necessarily a real point of the graph. I'll explain. If I have a line that goes from 26.4 to 25.3 I can click somewhere in the middle, and then it goes to show me a 26.1345 for example. First of all, therefore, I would like to be able to click only the real points drawn on the graph (perhaps also showing points on the clickable values). Another problem: if I change the view the tooltip disappears, instead I would like it to always remain visible, initially with the last value of the graph. Even the datetime it shows me in the axis isn't quite consistent with what I have in the JSON. In the JSON I have 10 minute intervals, for example: 01:00, 01:10, 01:20, etc and on the graph I have slightly different values.

    In the meantime I wrote the question, let me know if these things are feasible and possibly tell me what part of the code you need.

    If it were better to opt for C ++, I state that I have no experience, and if you know how to help me I also accept this solution, however it must connect with qml anyway, because it is a QML project, with a single page, but has a stackview on several pages arranged on a tab, and the graphs is one of the tabs arranged on this stackView.

    Thanks for now.

    Regards

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved