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

Support float point number formatting for point labels

    XMLWordPrintable

Details

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

    Description

      I found float point numbersĀ formatting in point labels useful to me. I implemented a demo in which format is described by the following class.

      class Q_CHARTS_EXPORT QPointLabelFormat {
      public:
          QString stringFormat;
          char xFloatFormat;
          int xPrec;
          char yFloatFormat;
          int yPrec;
      
          QPointLabelFormat(QString stringFormat_, char xFloatFormat_ = 'g', int xPrec_ = 6, char yFloatFormat_ = 'g', int yPrec_ = 6);
      
          bool operator==(const QPointLabelFormat &format) const;
          bool operator!=(const QPointLabelFormat &format) const { return !(*this == format); }
      };
      

      I think this feature may be useful to others too.

      Attachments

        1. a.png
          9.29 MB
          WeiBo He
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            e0348803 Miikka Heikkinen
            weibo WeiBo He
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes