antialiasing in generated graphics
(ZBXNEXT-447)
[ZBXNEXT-1659] Support of antialiased lines for generated graphs and maps Created: 2013 Mar 11 Updated: 2024 Apr 10 Resolved: 2013 Mar 18 |
|
Status: | Closed |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Change Request (Sub-task) | Priority: | Trivial |
Reporter: | Alexei Vladishev | Assignee: | Natalja Cernohajeva (Inactive) |
Resolution: | Fixed | Votes: | 2 |
Labels: | graphs, maps, usability | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: | antialised graph1.png graphafter1.png graphafter2.png graphbefore1.png graphbefore2.png mapafter1.png mapbefore1.png |
Team: | Team A |
Sprint: | Sprint 21, Sprint 22, Sprint 23 |
Story Points: | 0.1 |
Description |
This sub-task is for straight lines only. Support of circles, pie graphs, etc is out of scope. |
Comments |
Comment by Noah Leaman [ 2013 Mar 11 ] |
This would indeed be a nice enhancement to the current GD based approach. It's worth mentioning that another approach would be to move towards already developed web client based solutions: http://www.amcharts.com |
Comment by richlv [ 2013 Mar 12 ] |
will this include links in maps ? |
Comment by Alexei Vladishev [ 2013 Mar 13 ] |
Implemented under development branch svn://svn.zabbix.com/branches/dev/ZBXNEXT-1659, revision 34312. Ready to test. The change includes support of normal and bold anti-aliased lines lines for:
See attached screenshots. |
Comment by Toms (Inactive) [ 2013 Mar 14 ] |
(1) Regarding define('LINE_TYPE_NORMAL', '0'); define('LINE_TYPE_BOLD', '1'); in draw.inc.php All constants should be defined in defines.inc.php. Existing constants should be considered: GRAPH_ITEM_DRAWTYPE_BOLD_LINE and GRAPH_ITEM_DRAWTYPE_LINE + if constant value is intended to be integer, then shouldn't be in '' alexei FIXED in revision 34402 tomtom CLOSED |
Comment by Toms (Inactive) [ 2013 Mar 14 ] |
(2) Regarding function lip() in draw.inc.php
alexei FIXED in revision 34402 tomtom CLOSED |
Comment by Toms (Inactive) [ 2013 Mar 14 ] |
(3) Regarding function aline() in draw.inc.php
alexei FIXED in revision 34402 tomtom CLOSED |
Comment by Toms (Inactive) [ 2013 Mar 14 ] |
(4) antialised graph1.png <richlv> and notice that axis arrows show a regression alexei It appeared that standard imageline() function incorrectly rounds X/Y coordinates by silently dropping fraction part. It was replaced by a wrapper function everywhere in the code. Also fixed dashedLine() and empty right-most vertical line in graph area. FIXED in revision 34416. tomtom CLOSED |
Comment by Toms (Inactive) [ 2013 Mar 14 ] |
(5) Division by zero for aline() function if x1=x2 and y1=y2 alexei FIXED in revision 34402 tomtom CLOSED |
Comment by Toms (Inactive) [ 2013 Mar 14 ] |
(6) practically duplicate code in aline() lines: 67 - 96 and lines: 99 - 129 alexei Decided to leave as it is. CLOSED |
Comment by Toms (Inactive) [ 2013 Mar 14 ] |
(7) for swapping variables I propose using one-liner: list($a, $b) = array($b, $a); in draw.inc.php lines:69, 70 alexei FIXED in revision 34402 tomtom CLOSED |
Comment by Toms (Inactive) [ 2013 Mar 14 ] |
(8) $yfrac = $y - floor($y); $yint = round($y) - round($yfrac); $yint is the same as floor($y); alexei FIXED in revision 34402 tomtom CLOSED |
Comment by Toms (Inactive) [ 2013 Mar 14 ] |
(9) in draw.inc.php line: 70 and same in line: 101 for $x2 alexei FIXED in revision 34402 tomtom CLOSED |
Comment by Toms (Inactive) [ 2013 Mar 14 ] |
(10) no need for: alexei FIXED in revision 34402 tomtom CLOSED |
Comment by Toms (Inactive) [ 2013 Mar 14 ] |
(11) $gbcolor should be in camelCase in class.cbar line: 377 alexei FIXED in revision 34402 tomtom CLOSED |
Comment by Toms (Inactive) [ 2013 Mar 18 ] |
TESTED See my changes in r34435, if OK merge alexei CLOSED |
Comment by Alexei Vladishev [ 2013 Mar 18 ] |
Fixed in version pre-2.1.0, revision 34438. |
Comment by richlv [ 2013 Mar 18 ] |
(12) to be documented in whatsnew with nice, small before-after screenshots natalja.cernohajeva : Necessary documentation update has been executed, please review: sasha CLOSED |