Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Pie chart

    Scheduled Pinned Locked Moved webGUI
    9 Posts 3 Posters 2.8k Views
    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.
    • ?
      Guest
      last edited by

      Hi
      i want to find an easy and fast way to show a pie chart (or a 2d circular dashboard) for cpu usage in system information widget.
      Can you help me?
      Thanks in advance

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        Look at Diagnostics > States Summary.

        Though I think that pie chart code used Prototype and the GUI is almost all Jquery now, it should be easy to find one.

        A pie chart for the CPU usage seems… odd. If you want to use multiple things for system/user/nice/etc then a stacked bar would make more sense to show the same thing in less area.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • ?
          Guest
          last edited by

          states summary doesn't have any charts…
          that's right. pie chart is not appropriate.
          it's better to create a widget like this for dashboard:

          dashboard.png

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            Sorry not states summary, I forgot it's the firewall log summary. Status > System Logs, Firewall tab, summary view link.

            I'm not too crazy about the speedometer view. It seems crowded/cluttered and hard to interpret. (and too large)

            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            1 Reply Last reply Reply Quote 0
            • ?
              Guest
              last edited by

              Thanks jim,
              I have another question,
              Why cpu usage is zero in system information widget?

              1 Reply Last reply Reply Quote 0
              • jimpJ
                jimp Rebel Alliance Developer Netgate
                last edited by

                It is initialized to 0 and then updated by AJAX

                Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                Need help fast? Netgate Global Support!

                Do not Chat/PM for help!

                1 Reply Last reply Reply Quote 0
                • ?
                  Guest
                  last edited by

                  Excuse me jim,
                  you didn't use cpu_usage() function in system_information.widget.php.

                  How this code can update cpu usage?

                  
                  var url = "/widgets/widgets/system_information.widget.php";
                  		var pars = 'getupdatestatus=yes';
                  		jQuery.ajax(
                  			url,
                  			{
                  				type: 'get',
                  				data: pars,
                  				complete: activitycallback
                  			});
                  
                  
                  1 Reply Last reply Reply Quote 0
                  • jimpJ
                    jimp Rebel Alliance Developer Netgate
                    last edited by

                    https://github.com/pfsense/pfsense/blob/master/usr/local/www/javascript/index/ajax.js#L183

                    https://github.com/pfsense/pfsense/blob/master/usr/local/www/javascript/index/ajax.js#L8

                    https://github.com/pfsense/pfsense/blob/master/usr/local/www/includes/functions.inc.php#L13

                    Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                    Need help fast? Netgate Global Support!

                    Do not Chat/PM for help!

                    1 Reply Last reply Reply Quote 0
                    • N
                      NickKate
                      last edited by

                      You want a tool for creating 2D piecharts or dashboard charts which supports jquery,for this you should use Koolchart. Because it supports Javascript functionality and you can create any type of chart with it. Its really good as far as 2D charting is concerned.

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post
                      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.