Firefox 12 does not like generated image map
Hi,
When generating an imagemap for a stacked bar chart, firefox compalins:
The "coords" attribute of the <area shape="rect"> tag is not in the "left,top,right,bottom" format.
coords="663,185,702,167"
When complaining, JS runs very slow - fade in/out etc. The map appears to work though.
Chrome seems to be OK with the image map.
Is there some additional configuration required for FF?
My graph is based on the samples in the wiki:
Code:
/* Library settings */
define("CLASS_PATH", "pChart2.1.3/class");
define("FONT_PATH", "pChart2.1.3/fonts");
/* pChart library inclusions */
include(CLASS_PATH."/pData.class.php");
include(CLASS_PATH."/pDraw.class.php");
include(CLASS_PATH."/pImage.class.php");
/* Create and populate the pData object */
$MyData = new pData();
$MyData->addPoints($dataNormal,"Normal");
$MyData->addPoints($dataOpportunity,"Opportunity");
$MyData->addPoints($dataAbuse,"Abuse");
$MyData->loadPalette("pChart2.1.3/palettes/revised.color", TRUE);
$MyData->setAxisName(0,"Count");
$MyData->addPoints($download_dates,"Months");
$MyData->setSerieDescription("Months","Month");
$MyData->setAbscissa("Months");
/* Create the pChart object */
$myPicture = new pImage1000,330,$MyData);
/* Retrieve the image map */
if (isset($_GET["ImageMap"]) || isset($_POST["ImageMap"]))
$myPicture->dumpImageMap("ImageMapStackedBarChart",IMAGE_MAP_STORAGE_FILE,"StackedBarChart","tmp");
/* Set the image map name */
$myPicture->initialiseImageMap("ImageMapStackedBarChart",IMAGE_MAP_STORAGE_FILE,"StackedBarChart","tmp");
/* Turn of Antialiasing */
$myPicture->Antialias = FALSE;
/* Add a border to the picture */
$myPicture->drawRectangle(0,0,999,329,array("R"=>0,"G"=>0,"B"=>0));
/* Set the default font */
$myPicture->setFontProperties(array("FontName"=>FONT_PATH."/pf_arma_five.ttf","FontSize"=>8));
/* Define the chart area */
$myPicture->setGraphArea(60,40,950,200);
/* Draw the scale */
$AxisBoundaries = array(0=>array("Min"=>0,"Max"=>$max_download_y));
$scaleSettings = array("LabelRotation"=>90, "Mode"=>SCALE_MODE_MANUAL, "ManualScale"=>$AxisBoundaries,"GridR"=>200,"GridG"=>200,"GridB"=>200,"DrawSubTicks"=>TRUE,"CycleBackground"=>TRUE);
$myPicture->drawScale($scaleSettings);
/* Write the chart legend */
$myPicture->drawLegend(580,12,array("Style"=>LEGEND_NOBORDER,"Mode"=>LEGEND_HORIZONTAL));
/* Draw the chart */
$Settings = array("RecordImageMap"=>TRUE);
$myPicture->drawStackedBarChart($Settings);
/* Render the picture (choose the best way) */
$myPicture->autoOutput("tmp/StackedBarChart.png");