Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QtChart, is this possible ...
Forum Updated to NodeBB v4.3 + New Features

QtChart, is this possible ...

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 494 Views 2 Watching
  • 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.
  • Andy314A Offline
    Andy314A Offline
    Andy314
    wrote on last edited by
    #1

    Hello,
    I am looking for a way to integrate graphs (curve plots) in my program. I am not sure, if the QtChars will have all feature I need or if I must look for an other lib.
    This chapter of the documetation ist not clear for me:

    Multiple axes can be defined for one chart. The axes can be placed down, up, left, or right of the chart. Further, the axes can be of different types. However, mixing axis types that would result in different domains is not supported, such as specifying QValueAxis and QLogValueAxis on the same orientation.
    

    What does it mean "different domains" ? Is is it possible to show 2 line plots in one chartview, where both lines are connected to the same horizontal axis, but have different vertical axes (on at left and one at right side) with different scale.

    Because you add a series to the whole chart and not to two axes its seem that it is not possible - or ?

    chartView->chart()->addSeries(series);
    chartView->chart()->createDefaultAxes();
    

    Is something like the following possible:

    series->setAxes(horizAxis, vertAxis)
    

    In this context, is it possible to make, so to speek, "subcharts". Means that I can place custom axes at any place of the chart.

    ^
    |
    |
    |-----------------|---------------->
    0    .        100   0    ....... 10  
    

    Has anybody experiences with it.

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      I dont know if its possible to have sub chars like that.
      However, i think "different domains" means types of axises that have different coordinate system/ calculation/scale.
      Moreover, i think void QChart::addAxis(QAbstractAxis *axis, Qt::Alignment alignment)
      wont allow stacking them going right. However, not actually tried it so that would be the
      first i would do.
      Note that createDefaultAxes deletes any custom ones you already set so have that in mind.

      How many sub charts to you plan to have?

      Andy314A 1 Reply Last reply
      0
      • mrjjM mrjj

        Hi
        I dont know if its possible to have sub chars like that.
        However, i think "different domains" means types of axises that have different coordinate system/ calculation/scale.
        Moreover, i think void QChart::addAxis(QAbstractAxis *axis, Qt::Alignment alignment)
        wont allow stacking them going right. However, not actually tried it so that would be the
        first i would do.
        Note that createDefaultAxes deletes any custom ones you already set so have that in mind.

        How many sub charts to you plan to have?

        Andy314A Offline
        Andy314A Offline
        Andy314
        wrote on last edited by
        #3

        Hello @mrjj ,

        How many subchars ? Hm, dont know. Dynamic ... five ....

        Ok subcharts are not possible (resp. directly - maybe one can subclass and overwrite something).
        or stacking multiple QCharts with, one axis in every chart with same configuration, is possible.....

        Nevertheless, my first simpler question is not clear for me. Is it possible to mix axes with one orientation but with different range (same coordinate type). For example a Axis1 [0,10] left and a Axis 2 [0,100] right. So that a seriespoint (0, 10) connetect to left axis and a series point (0, 100) connected to right axis are both shown on the top of the chart. I hope you understand my roundabout explanation.

        I cannot test it because I have no commercial version, yet.

        Bye Andreas

        1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Andy314 said in QtChart, is this possible ...:

          I cannot test it because I have no commercial version, yet.

          It's GPL so why can't you test it?

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          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