Home » Images » Image_Graph » Bug #4162
Title under Marker
Details
| Submitted | 2005-04-16 11:59 UTC |
|---|---|
| From | zoullou77 at gmail dot com |
| Assigned | nosey |
| Status | Closed |
| Package | Image_Graph |
| PHP Version | 4.3.8 |
| OS | Linux MDK 10.1 |
| Roadmaps | (Not assigned) |
Comments
[2005-04-16 11:59 UTC] zoullou77 at gmail dot com
Description:
------------
When i make a complex graph with pie, the pie title is at the same level that marker and the title is under marker => title is unreadable.
Reproduce code:
---------------
$Graph =& Image_Graph::factory('graph', array(400, 300));
$Graph->add(
Image_Graph::vertical(
Image_Graph::vertical(
Image_Graph::vertical(
Image_Graph::factory('plotarea'),
$Plotarea1 =& Image_Graph::factory('plotarea'),
8
),
Image_Graph::horizontal(
$Plotarea2 =& Image_Graph::factory('plotarea'),
$Plotarea3 =& Image_Graph::factory('plotarea'),
50
),
50
),
$Legend =& Image_Graph::factory('legend'),
90
)
);
$Legend->setPlotarea($Plotarea1);
$Plotarea1->hideAxis();
$Plotarea2->hideAxis();
$Plotarea3->hideAxis();
$Plotarea1->addNew('title', array('Total', array('size' => 7)));
$Plotarea2->addNew('title', array('Domicile', array('size' => 7)));
$Plotarea3->addNew('title', array('Exterieur', array('size' => 7)));
$Dataset =& Image_Graph::factory('dataset');
$Dataset->addPoint('Gagnés', 1);
$Dataset->addPoint('Perdues', 1);
$Plot1 =& $Plotarea1->addNew('pie', $Dataset);
$Plot2 =& $Plotarea2->addNew('pie', $Dataset);
$Plot3 =& $Plotarea3->addNew('pie', $Dataset);
$Marker1 =& $Plot1->addNew('value_marker', IMAGE_GRAPH_PCT_Y_TOTAL);
$PointingMarker1 =& $Plot1->addNew('Image_Graph_Marker_Pointing_Angular', array(20, &$Marker1));
$Plot1->setMarker($PointingMarker1);
$Marker1->setDataPreprocessor(Image_Graph::factory('Image_Graph_DataPreprocessor_Formatted', '%0.1f%%'));
$Marker2 =& $Plot1->addNew('value_marker', IMAGE_GRAPH_PCT_Y_TOTAL);
$PointingMarker2 =& $Plot2->addNew('Image_Graph_Marker_Pointing_Angular', array(20, &$Marker2));
$Plot2->setMarker($PointingMarker2);
$Marker2->setDataPreprocessor(Image_Graph::factory('Image_Graph_DataPreprocessor_Formatted', '%0.1f%%'));
$Marker3 =& $Plot3->addNew('value_marker', IMAGE_GRAPH_PCT_Y_TOTAL);
$PointingMarker3 =& $Plot3->addNew('Image_Graph_Marker_Pointing_Angular', array(20, &$Marker3));
$Plot3->setMarker($PointingMarker3);
$Marker3->setDataPreprocessor(Image_Graph::factory('Image_Graph_DataPreprocessor_Formatted', '%0.1f%%'));
$Graph->addNew('title', array('Rencontres', 11));
$Graph->done();
Actual result:
--------------
http://zoullou.free.fr/test2.png
[2005-04-17 06:48 UTC] pear dot nosey at veggerby dot dk
Thank you for taking the time to write to us, but this is not
a bug.
Well this is actually as expected!
When you "add" a new title to an element it is simply overlayed on the element (i.e. you have the possibility for overlaps).
What is intended is that you put the title in with your layout (as fx. in http://pear.veggerby.dk/samples/index.php?sample=87).
The add-/addNew-method does not do any coordinate adjustments
/Jesper