Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-102292

QChart: Make it easier to showing axes ranges without any data

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 6.3.0 RC
    • Charts

    Description

      Currently, the only way to show axes without any data is by adding a dummy blank series:

      auto dummySeries = new QLineSeries;
      
      auto chart = new QChart();
      chart->addSeries(dummySeries);
      chart->createDefaultAxes();
      chart->axes(Qt::Horizontal).first()->setRange(-20, 20);
      chart->axes(Qt::Vertical).first()->setRange(-10, 10);
      
      dummySeries->deleteLater();
      

      It would be good if dummySeries is not needed.

       

      Use-case

      The customer would like to show a blank fixed-range chart first, and then dynamically add an arbitrary number of series later.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            e0348803 Miikka Heikkinen
            skoh-qt Sze Howe Koh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes