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

QDateTimeAxis: Support displaying values in user-specified timezone

    XMLWordPrintable

Details

    Description

      Example use-case: Implementing a time-series log viewer, where logs come from all over the world and the sampling period is in the order of hours or finer.

       

      import QtQuick
      import QtGraphs
      
      Window {
          width: 800
          height: 600
          visible: true
      
          GraphsView {
              anchors.fill: parent
      
              axisX: DateTimeAxis {
                  labelsAngle: 45
                  labelFormat: "hh:mm:ss" // I want to be able to see the labels in local time, or New York time, or some other arbitrary timezone
                  min: new Date("2000-01-01T00:00:00Z")
                  max: new Date("2000-01-01T00:30:00Z")
              }
              axisY: ValueAxis {
                  min: 0
                  max: 10
              }
      
              LineSeries {
                  XYPoint { x: new Date("2000-01-01T00:00:00Z"); y:  0 }
                  XYPoint { x: new Date("2000-01-01T00:30:00Z"); y: 10 }
              }
          }
      }
      

      Attachments

        Issue Links

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

          Activity

            People

              owaisakhtar Owais Akhtar
              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