﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>FusionCharts Forum / FusionMaps v3 / Bug Reports  / problem with data value = maxValue / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>FusionCharts Forum</description><link>http://www.fusioncharts.com/forum/</link><webMaster>support@fusioncharts.com</webMaster><lastBuildDate>Sun, 12 Oct 2008 22:20:23 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: problem with data value = maxValue</title><link>http://www.fusioncharts.com/forum/Topic3552-12-1.aspx</link><description>I believe I have solved the problem.  The $dataArray MUST be in sorted order.  I discovered this accidentally, but it seems to have worked.</description><pubDate>Sun, 30 Dec 2007 20:35:57 GMT</pubDate><dc:creator>keithh0427</dc:creator></item><item><title>problem with data value = maxValue</title><link>http://www.fusioncharts.com/forum/Topic3552-12-1.aspx</link><description>&lt;SPAN id=_ctl1_ctlTopic_ctlPanelBar_ctlTopicsRepeater__ctl1_lblFullMessage&gt;I belive there is a small "bug" in the code for displaying colors and a legend. &lt;P&gt;consider the following:&lt;/P&gt;&lt;P&gt;&amp;lt;?php&lt;BR&gt;$dataArray[0][1]="IL"; $dataArray[0][2]="10";&lt;BR&gt;$dataArray[1][1]="IN"; $dataArray[1][2]="0";&lt;BR&gt;$dataArray[2][1]="IA"; $dataArray[2][2]="0";&lt;BR&gt;$dataArray[3][1]="MI"; $dataArray[3][2]="1";&lt;BR&gt;$dataArray[4][1]="WI"; $dataArray[4][2]="2";&lt;/P&gt;&lt;P&gt;&lt;BR&gt;// Declare $strXML to store dataXML of the map &lt;BR&gt;$strXML = "&amp;lt;map animation='0' showShadow='0' showBevel='0' showMarkerLabels='1' fillColor='F1f1f1' borderColor='000000' baseFont='Verdana' baseFontSize='10' markerBorderColor='000000' markerBgColor='FF5904' markerRadius='6' legendPosition='bottom' useHoverColor='1' showMarkerToolTip='1'  &amp;gt;";&lt;/P&gt;&lt;P&gt;// Opening MAP element&lt;BR&gt;$strXML = "&amp;lt;map showLabels='1' includeNameInLabels='1' borderColor='FFFFFF' fillAlpha='80' showBevel='0' legendPosition='Bottom' &amp;gt;";&lt;/P&gt;&lt;P&gt;// Setting Color ranges : 4 color ranges for population ranges&lt;BR&gt;$strXML .= "&amp;lt;colorRange&amp;gt;";&lt;BR&gt;$strXML .= "&amp;lt;color minValue='1' maxValue='5' displayValue='0 - 5' color='FFD33A' /&amp;gt;";  // CC0001&lt;BR&gt;$strXML .= "&amp;lt;color minValue='6' maxValue='10' displayValue='6 - 10' color='CC0001' /&amp;gt;";  // FFD33A&lt;BR&gt;$strXML .= "&amp;lt;color minValue='11' maxValue='15' displayValue='11 - 15' color='069F06' /&amp;gt;"; // 069F06&lt;BR&gt;$strXML .= "&amp;lt;color minValue='16' maxValue='20' displayValue='&amp;gt; 16' color='ABF456' /&amp;gt;";  // ABF456&lt;BR&gt;$strXML .= "&amp;lt;/colorRange&amp;gt;&amp;lt;data&amp;gt;";&lt;/P&gt;&lt;P&gt;// Opening data element that will store map data&lt;BR&gt;// Using Data from array for each entity &lt;BR&gt;for($i=0;$i&amp;lt;=4;$i++){&lt;BR&gt;$strXML .= "&amp;lt;entity id='" . $dataArray[$i][1] . "' value='" . $dataArray[$i][2] . "' /&amp;gt;";&lt;BR&gt;}&lt;/P&gt;&lt;P&gt;// closing data element &lt;BR&gt;$strXML .= "&amp;lt;/data&amp;gt;";&lt;/P&gt;&lt;P&gt;// closing map element&lt;BR&gt;$strXML .= "&amp;lt;/map&amp;gt;";&lt;/P&gt;&lt;P&gt;// Finally Rendering the World8 Maps with renderMap() php function present in FusionMaps.php (that we have inlcuded already) &lt;BR&gt;// Since we're using dataXML method, we provide a "" value for dataURL here&lt;/P&gt;&lt;P&gt;print renderMap("FusionMaps/FCMap_USA.swf","",$strXML,"firstMap", 750, 460,0,0);&lt;BR&gt;?&amp;gt;&lt;/P&gt;&lt;P&gt;the color is not displaying if the array value is equal to the max value in the color range.  I have to increase the maxvalue by 1 to the get the desired results.  However, this will throw off the range when I do this dynamically with a database.  I cannot check the max value each time to see if a value is equal to it.&lt;/P&gt;&lt;P&gt;Is there a work-around?&lt;BR&gt;&lt;/SPAN&gt;</description><pubDate>Sat, 29 Dec 2007 15:11:01 GMT</pubDate><dc:creator>keithh0427</dc:creator></item></channel></rss>