Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qSYYE-006Jvh-3M for pgadmin-hackers@arkaria.postgresql.org; Sun, 06 Aug 2023 07:51:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qSYYC-002tN7-JB for pgadmin-hackers@arkaria.postgresql.org; Sun, 06 Aug 2023 07:51:44 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qSYYC-002tMT-35 for pgadmin-hackers@lists.postgresql.org; Sun, 06 Aug 2023 07:51:44 +0000 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qSYY9-000oMs-UI for pgadmin-hackers@postgresql.org; Sun, 06 Aug 2023 07:51:43 +0000 Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-564af1b3a9fso1696445a12.1 for ; Sun, 06 Aug 2023 00:51:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691308300; x=1691913100; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=CjG6XhCKmZdimZP+Ed6j/d0ozxPa5PISf6xglUDkl2E=; b=Ey+br3Y8Y+RaF8WBCilK2N5IIU2q28QVZbWpTRBxNXKyQMjSDIcSq7p3UH4YmkeQaT 6gMvSE9/CxbW+nAQCw4OoRyPRNzjpdpB94r61P37Lnoc+moy2t8WlHW7C7ixmKugwyBL rnxS+XP7GsNKvQNbLZKtEn55iXf+Dm3a/Q3add2YsJUlTUA8E9jdU8uEfVoEGsdmADP1 uyTINMdl1bIak6/zo4Qx9FxUGh06jZ/LLlKCMlnwCZKuDwzKSTwbvAmGivprQHY6AD4X R70L1BXFz7Az25J4lDx1JLClLvOEb3bAwLdDQMoegcL2EuAg5EnjsVoLxjM3l/5TZdVe Thcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691308300; x=1691913100; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CjG6XhCKmZdimZP+Ed6j/d0ozxPa5PISf6xglUDkl2E=; b=cj1C0vuotLwF0i9FXtXMvFSCfe0Hn5jGuj3Lfkk5mtY3q0OsK5itk3x0UKSKSpni8B YwanYy0VzncdRfqnPZ34dpR/wPtfBg2DTYlaB7WeKeuB0QRCWGTRl05SmFeqVkGA3Qeg rDLRj3AAt/ijkLzXziuATFy34G0z/Rrjb8HFHz2etTBZfiYpuUpmjrCBmrblpR6S69T5 93bRTsURMF9MiKIlUpGlhIdG2la/314u2u/+VzMw5lTYHxJLn0vhL5shqRPKBNFeAovH N2yvTH4O/hVMs+H7ubLu8+rvxpa3nMGWdT3ethW7uGeADab+DwRsyjRde06jdruWw/9d pCVw== X-Gm-Message-State: AOJu0YzX65d/4xjVThZT+eRSosPfa8uVzSh8JbiDEyNVlGAfZ9+Hgh0w wgSqa0Zdv6EJgfg6UMRUtlkvNv9gP7CGQvaJpgk= X-Google-Smtp-Source: AGHT+IHXySonM45Lm9mIbytsB1lJjKJ5OelyKfsCiO7vmxMcwEDz+A7gcDeWZPFaBcpHvT8nfDDOWEUS3NVz3gnQjgo= X-Received: by 2002:a17:90a:1fcf:b0:263:eb0e:5681 with SMTP id z15-20020a17090a1fcf00b00263eb0e5681mr4877591pjz.3.1691308299790; Sun, 06 Aug 2023 00:51:39 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Sahil Harpal Date: Sun, 6 Aug 2023 13:21:26 +0530 Message-ID: Subject: Re: Pgadmin4 System Stats Extension Design To: Aditya Toshniwal Cc: Khushboo Vashi , pgadmin-hackers@postgresql.org, Ashesh Vashi , Dave Page , Akshay Joshi Content-Type: multipart/alternative; boundary="0000000000006a337e06023c66ad" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000006a337e06023c66ad Content-Type: text/plain; charset="UTF-8" Hi Aditya, On Thu, 3 Aug 2023 at 09:32, Aditya Toshniwal < aditya.toshniwal@enterprisedb.com> wrote > Because it is the default behaviour of streaming. You can add a prop > reverse=true to StreamingChart and change the code ret.reverse(); based > on condition. > So basically, you are suggesting to add one additional property to the streaming chart, right? Based on its value, apply ret.reverse(). This means if reverse is true, apply ret.reverse(), otherwise don't. But it is required to reverse our data every time, otherwise, I believe the most recent data point will be at the beginning of our plot. I've tried one more approach here. If our data array is full, this graph shifting won't happen. So, if we initialize our data list with null values, there won't be any visible shift. What do you think about this solution? Unrelated to this, I think instead of showing disk sizes in bytes you can > show them in a human readable format like below used in Statistics tab of > Tables collection node. > Sure I'll do this! --0000000000006a337e06023c66ad Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Aditya,
On Thu, 3 Aug 2023 a= t 09:32, Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote
3D""
<= span class=3D"gmail_default" style=3D"font-family:verdana,sans-serif">Becau= se it is the default behaviour of streaming.=C2=A0You can add a prop=C2= =A0reverse=3Dtrue=C2=A0to Str= eamingChart and change the code=C2=A0ret.reverse();=C2=A0based on condition.
So basically, you are sugge= sting to add one additional property to the streaming chart, right? Based o= n its value, apply ret.reverse(). This means if reverse is true, apply ret.= reverse(), otherwise don't. But it is required to reverse our data ever= y time, otherwise, I believe the most recent data point will be at the begi= nning of our plot.
I've tried one more approach here. If our data ar= ray is full, this graph shifting won't happen. So, if we initialize our= data list with null values, there won't be any visible shift. What do = you think about this solution?

<= div>Unrelated to this, I think i= nstead of showing disk sizes in bytes you can show them in a human readable= format like below used in Statistics=C2=A0tab of Tables collection node.
Sure I'll do this!=C2= =A0
--0000000000006a337e06023c66ad--