This sub-task is for straight lines only. Support of circles, pie graphs, etc is out of scope.
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:
will this include links in maps ?
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.
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 Vladishev FIXED in revision 34402
(2) Regarding function lip() in draw.inc.php
(3) Regarding function aline() in draw.inc.php
(4) antialised graph1.png
Line displayed some pixels lower to actual values.
<richlv> and notice that axis arrows show a regression
Alexei Vladishev 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.
(5) Division by zero for aline() function if x1=x2 and y1=y2
(6) practically duplicate code in aline() lines: 67 - 96 and lines: 99 - 129
Alexei Vladishev Decided to leave as it is. CLOSED
(7) for swapping variables I propose using one-liner: list($a, $b) = array($b, $a); in draw.inc.php lines:69, 70
$yfrac = $y - floor($y);
$yint = round($y) - round($yfrac);
$yint is the same as floor($y);
$tmp = $y2; $y2 = $y1; $y1 = $tmp;
$y2 unused, no need for swapping;
in draw.inc.php line: 70 and same in line: 101 for $x2
(10) no need for:
$dx = -$dx; $dy = -$dy;
as afterwards they are used in division.
(11) $gbcolor should be in camelCase in class.cbar line: 377
See my changes in r34435, if OK merge
Alexei Vladishev CLOSED
Fixed in version pre-2.1.0, revision 34438.
(12) to be documented in whatsnew with nice, small before-after screenshots
subissues still open : 12