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. Guidance on Best Practices for Custom Interactive Charts (e.g., Candlestick) in Qt Graphs 2D

Guidance on Best Practices for Custom Interactive Charts (e.g., Candlestick) in Qt Graphs 2D

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qt graphs
1 Posts 1 Posters 418 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.
  • C Offline
    C Offline
    Camellia
    wrote on last edited by
    #1

    Hello everyone,

    I am a Python developer transitioning from the Qt Widgets framework to Qt Quick, and I am currently exploring the best way to implement advanced charting features in my new projects.

    In my previous work with Qt Widgets, I successfully used the pyqtgraph library to create highly interactive and custom plots, including financial charts like candlestick graphs. The performance and flexibility of pyqtgraph met my needs well.

    Now, for my Qt Quick application, I am very interested in using the Qt Graphs module due to its native integration and potential performance benefits. My core requirements are:

    • To render stock-style candlestick charts.

    • To create other, more flexible custom visualizations.

    • To ensure all charts are highly interactive, supporting features like hover events on data points, click actions, and so on.

    For maximum flexibility and to handle other custom plotting needs, I am exploring the most robust and recommended development patterns.
    I have considered two primary approaches and would greatly appreciate your guidance on them:

    • Creating a Custom Series by Subclassing AbstractSeries:
      My first thought is to create a new series type by inheriting from AbstractSeries (QML type). This seems like a powerful way to integrate deeply with the Qt Graphs module, but I am unsure of the complexity involved, especially when integrating with a Python application environment.

    • Embedding a Custom QQuickItem within a GraphsView:
      My second idea is to leverage the rendering capabilities of a custom QQuickItem. This approach seems to offer maximum rendering flexibility, but I foresee challenges in correctly mapping my item's coordinates to the chart's axes and ensuring seamless interaction with the rest of the GraphsView (like responding to zoom/pan events).

    Given this context, I would like to ask for your advice:

    • For creating highly interactive and custom-styled financial charts in a Qt Quick (and Python) environment, what is the officially recommended approach?

    • Between the two approaches I've outlined—subclassing AbstractSeries vs. creating a custom QQuickItem—what are the primary trade-offs regarding performance, implementation complexity, and ease of integration?

    • Is there another, more effective method that I might have overlooked?

    Thank you for your time, and any advice or examples you can provide would be immensely helpful.

    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