Ad Widget

Collapse

PATCH: Better pie chart layout

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JBo
    Senior Member
    • Jan 2011
    • 310

    #1

    PATCH: Better pie chart layout

    Hi,

    When 'Show legend' option is active in a pie chart, a lot of space is lost on the right side as can be seen in attached zabbix_pie.png.

    I have attached a patch that:
    • removes 'Value:' useless label,
    • moves values next to item names,
    • centers pie horizontally.


    After applying this patch, the pie looks like attached zabbix_pie_optimized.png and graph width can be reduced.

    The patch applies to Zabbix 2.0.0.
    If you like it, you can vote for it on Zabbix bug traker : ZBX-5068

    Regards,
    JBo
    Attached Files
  • Pada
    Senior Member
    • Apr 2012
    • 236

    #2
    Hi,

    Thank you for your awesome idea & patch!

    We're still running Zabbix 1.8.11, so I couldn't just apply your patch on our system.

    I've now created a similar kind of patch for Zabbix 1.8.13, but with a few additional (marked in bold) modifications.

    The attached patch changes the following things:
    1. Horizontally centers all pie charts
    2. removes legend on the right
    3. displays legend in a table form - similar to the normal/stacked graphs
    4. removes hostname if all the items are on the same host
    5. fix: changed the normal/stacked graphs' default function type from [avg] to [all]


    One issue with my table layout for the pie chart legend is that the 'value' and '% of total' headers are fixed to English and not multilingual!
    Attached Files
    Last edited by Pada; 27-07-2012, 14:32.

    Comment

    Working...