• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    Help Setting Serial Chart From and To

    User help
    2
    4
    1.3k
    Loading More Posts
    • 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
      chio
      last edited by

      I have a watch list serial chart in a dashboard. I do not want the From and To to be populated by datebar.To and datebar.From instead I want it to always be the trailing 7 days and still enable the user to zoom if desired.

      So ideally it would be like:
      to: datetime.datetime.now()
      from: datetime.datetime.now() - timedelta(days=7)

      Any thoughts on how to achieve this are much appreciated.

      Thanks

      1 Reply Last reply Reply Quote 0
      • phildunlapP
        phildunlap
        last edited by

        Hi chio,

        You could achieve this with an ma-date-range-picker that was hidden on the page. Something like,

        <ma-date-range-picker style="display: none" preset="LAST_1_WEEKS" to="toTimestamp" from="fromTimestamp"></ma-date-range-picker>
        

        and then use the toTimestamp and fromTimestamp in the chart's markup.

        1 Reply Last reply Reply Quote 1
        • C
          chio
          last edited by

          @phildunlap thanks this worked great

          1 Reply Last reply Reply Quote 0
          • phildunlapP
            phildunlap
            last edited by

            Glad to hear it, I mostly took it from this thread: https://forum.infiniteautomation.com/topic/3590/ma-date-range-picker

            1 Reply Last reply Reply Quote 0
            • First post
              Last post