Sign in to follow this  
suan.ngaihte

Map size increase after post back

Recommended Posts

Dear All,

I am new to this control and have no much idea on how it works, and implemented on asp.net. The map we used increases the size and display became incorrect (means some part of the map gets cut off) when a page post back occurs. Please find the images below:

 

Image Before Postback occurs (when loaded for first time)

80169e5d-699e-48d3-9f26-29a7.JPG

Image after Postback occurs:

d7b61a21-e549-4930-9aee-6ed1.JPG

Following is the xml code generated during runtime:

Fist time (Before postback)

<!-- START Script Block for Chart myTable -->

<div id='myTableDiv' align='left'>

Chart.

</div>

<script type="text/javascript">

var chart_myTable = new FusionCharts("../PowerMaps/FCMap_France.swf", "myTable", "650", "550", "0", "0");

chart_myTable.setDataXML("<map fillcolor='99CCFF' showToolTip='0' animation='0' showShadow='0' showBevel='0' showLegend='0' showLabels='0' showMarkerLabels='1'  borderColor='000000'  baseFont='Verdana' baseFontSize='10'  markerBorderColor='000000' markerBgColor='FF5904' markerRadius='3' legendPosition='bottom' useHoverColor='0' showMarkerToolTip='1'  ><markers><definition><marker id='369' x='565' y='530' label='Ajaccio' color='00ff00' labelPos='Top' /><marker id='370' x='387' y='211' label='Auxerre' color='00ff00' labelPos='Top' /><marker id='371' x='225' y='391' label='Bordeaux' color='00ff00' labelPos='Bottom' /><marker id='372' x='272' y='197' label='Le Mans' color='00ff00' labelPos='Left' /><marker id='373' x='356' y='51' label='Lens' color='00ff00' labelPos='Left' /><marker id='374' x='370' y='39' label='Lille' color='00ff00' labelPos='Top' /><marker id='375' x='449' y='308' label='Lyon' color='00ff00' labelPos='Bottom' /><marker id='376' x='447' y='466' label='Marseille' color='00ff00' labelPos='Right' /><marker id='377' x='486' y='140' label='Metz' color='00ff00' labelPos='Top' /><marker id='378' x='529' y='437' label='Monaco' color='00ff00' labelPos='Right' /><marker id='379' x='486' y='152' label='Nancy' color='00ff00' labelPos='Bottom' /><marker id='380' x='189' y='247' label='Nantes' color='00ff00' labelPos='Top' /><marker id='381' x='526' y='433' label='Nice' color='00ff00' labelPos='Top' /><marker id='382' x='353' y='143' label='Paris Saint-Germain' color='00ff00' labelPos='Bottom' /><marker id='383' x='519' y='444' label='Rennes' color='00ff00' labelPos='Left' /><marker id='384' x='182' y='188' label='Saint-Etienne' color='00ff00' labelPos='Top' /><marker id='385' x='503' y='220' label='Sochaux' color='00ff00' labelPos='Bottom' /><marker id='386' x='542' y='152' label='Strasbourg' color='00ff00' labelPos='Top' /><marker id='387' x='308' y='450' label='Toulouse' color='00ff00' labelPos='Top' /><marker id='388' x='414' y='184' label='Troyes' color='00ff00' labelPos='Top' /><marker id='389' x='330' y='95' label='Amiens' color='00ff00' labelPos='Right' /><marker id='390' x='590' y='485' label='Bastia' color='00ff00' labelPos='Right' /><marker id='391' x='68' y='167' label='Brest' color='00ff00' labelPos='Right' /><marker id='392' x='250' y='125' label='Caen' color='00ff00' labelPos='Right' /><marker id='393' x='315' y='273' label='Chateauroux' color='00ff00' labelPos='Top' /><marker id='394' x='375' y='308' label='Clermont' color='00ff00' labelPos='Top' /><marker id='396' x='445' y='240' label='Dijon' color='00ff00' labelPos='Left' /><marker id='397' x='465' y='350' label='Grenoble' color='00ff00' labelPos='Top' /><marker id='398' x='399' y='277' label='Gueugnon' color='00ff00' labelPos='Right' /><marker id='399' x='120' y='156' label='Guingamp' color='00ff00' labelPos='Top' /><marker id='402' x='270' y='110' label='Le Havre' color='00ff00' labelPos='Right' /><marker id='403' x='104' y='207' label='Lorient' color='00ff00' labelPos='Top' /><marker id='404' x='400' y='450' label='Montpellier' color='00ff00' labelPos='Top' /><marker id='405' x='420' y='130' label='Reims' color='00ff00' labelPos='Bottom' /><marker id='406' x='431' y='100' label='Sedan' color='00ff00' labelPos='Top' /><marker id='408' x='392' y='54' label='Valenciennes' color='00ff00' labelPos='Right' /><marker id='1072' x='225' y='305' label='Niort' color='00ff00' labelPos='Right' /><marker id='1074' x='235' y='380' label='Libourne' color='00ff00' labelPos='Right' /><marker id='1180' x='235' y='220' label='Angers' color='00ff00' labelPos='Right' /><marker id='1181' x='315' y='38' label='Boulogne-sur-Mer' color='00ff00' labelPos='Left' /></definition><application><marker id='369' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d369' /><marker id='370' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d370' /><marker id='371' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d371' /><marker id='372' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d372' /><marker id='373' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d373' /><marker id='374' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d374' /><marker id='375' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d375' /><marker id='376' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d376' /><marker id='377' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d377' /><marker id='378' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d378' /><marker id='379' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d379' /><marker id='380' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d380' /><marker id='381' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d381' /><marker id='382' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d382' /><marker id='383' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d383' /><marker id='384' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d384' /><marker id='385' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d385' /><marker id='386' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d386' /><marker id='387' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d387' /><marker id='388' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d388' /><marker id='389' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d389' /><marker id='390' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d390' /><marker id='391' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d391' /><marker id='392' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d392' /><marker id='393' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d393' /><marker id='394' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d394' /><marker id='396' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d396' /><marker id='397' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d397' /><marker id='398' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d398' /><marker id='399' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d399' /><marker id='402' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d402' /><marker id='403' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d403' /><marker id='404' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d404' /><marker id='405' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d405' /><marker id='406' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d406' /><marker id='408' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d408' /><marker id='1072' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d1072' /><marker id='1074' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d1074' /><marker id='1180' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d1180' /><marker id='1181' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d1181' /></application></markers></map>");

chart_myTable.render("myTableDiv");

</script>

<!-- END Script Block for Chart myTable -->

 

Second time (After postback)

<!-- START Script Block for Chart myTable -->

<div id='myTableDiv' align='left'>

Chart.

</div>

<script type="text/javascript">

var chart_myTable = new FusionCharts("../PowerMaps/FCMap_France.swf", "myTable", "650", "550", "0", "0");

chart_myTable.setDataXML("<map fillcolor='99CCFF' showToolTip='0' animation='0' showShadow='0' showBevel='0' showLegend='0' showLabels='0' showMarkerLabels='1'  borderColor='000000'  baseFont='Verdana' baseFontSize='10'  markerBorderColor='000000' markerBgColor='FF5904' markerRadius='3' legendPosition='bottom' useHoverColor='0' showMarkerToolTip='1'  ><markers><definition><marker id='369' x='565' y='530' label='Ajaccio' color='00ff00' labelPos='Top' /><marker id='370' x='387' y='211' label='Auxerre' color='00ff00' labelPos='Top' /><marker id='371' x='225' y='391' label='Bordeaux' color='00ff00' labelPos='Bottom' /><marker id='372' x='272' y='197' label='Le Mans' color='00ff00' labelPos='Left' /><marker id='373' x='356' y='51' label='Lens' color='00ff00' labelPos='Left' /><marker id='374' x='370' y='39' label='Lille' color='00ff00' labelPos='Top' /><marker id='375' x='449' y='308' label='Lyon' color='00ff00' labelPos='Bottom' /><marker id='376' x='447' y='466' label='Marseille' color='00ff00' labelPos='Right' /><marker id='377' x='486' y='140' label='Metz' color='00ff00' labelPos='Top' /><marker id='378' x='529' y='437' label='Monaco' color='00ff00' labelPos='Right' /><marker id='379' x='486' y='152' label='Nancy' color='00ff00' labelPos='Bottom' /><marker id='380' x='189' y='247' label='Nantes' color='00ff00' labelPos='Top' /><marker id='381' x='526' y='433' label='Nice' color='00ff00' labelPos='Top' /><marker id='382' x='353' y='143' label='Paris Saint-Germain' color='00ff00' labelPos='Bottom' /><marker id='383' x='519' y='444' label='Rennes' color='00ff00' labelPos='Left' /><marker id='384' x='182' y='188' label='Saint-Etienne' color='00ff00' labelPos='Top' /><marker id='385' x='503' y='220' label='Sochaux' color='00ff00' labelPos='Bottom' /><marker id='386' x='542' y='152' label='Strasbourg' color='00ff00' labelPos='Top' /><marker id='387' x='308' y='450' label='Toulouse' color='00ff00' labelPos='Top' /><marker id='388' x='414' y='184' label='Troyes' color='00ff00' labelPos='Top' /><marker id='389' x='330' y='95' label='Amiens' color='00ff00' labelPos='Right' /><marker id='390' x='590' y='485' label='Bastia' color='00ff00' labelPos='Right' /><marker id='391' x='68' y='167' label='Brest' color='00ff00' labelPos='Right' /><marker id='392' x='250' y='125' label='Caen' color='00ff00' labelPos='Right' /><marker id='393' x='315' y='273' label='Chateauroux' color='00ff00' labelPos='Top' /><marker id='394' x='375' y='308' label='Clermont' color='00ff00' labelPos='Top' /><marker id='396' x='445' y='240' label='Dijon' color='00ff00' labelPos='Left' /><marker id='397' x='465' y='350' label='Grenoble' color='00ff00' labelPos='Top' /><marker id='398' x='399' y='277' label='Gueugnon' color='00ff00' labelPos='Right' /><marker id='399' x='120' y='156' label='Guingamp' color='00ff00' labelPos='Top' /><marker id='402' x='270' y='110' label='Le Havre' color='00ff00' labelPos='Right' /><marker id='403' x='104' y='207' label='Lorient' color='00ff00' labelPos='Top' /><marker id='404' x='400' y='450' label='Montpellier' color='00ff00' labelPos='Top' /><marker id='405' x='420' y='130' label='Reims' color='00ff00' labelPos='Bottom' /><marker id='406' x='431' y='100' label='Sedan' color='00ff00' labelPos='Top' /><marker id='408' x='392' y='54' label='Valenciennes' color='00ff00' labelPos='Right' /><marker id='1072' x='225' y='305' label='Niort' color='00ff00' labelPos='Right' /><marker id='1074' x='235' y='380' label='Libourne' color='00ff00' labelPos='Right' /><marker id='1180' x='235' y='220' label='Angers' color='00ff00' labelPos='Right' /><marker id='1181' x='315' y='38' label='Boulogne-sur-Mer' color='00ff00' labelPos='Left' /></definition><application><marker id='369' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d369' /><marker id='370' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d370' /><marker id='371' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d371' /><marker id='372' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d372' /><marker id='373' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d373' /><marker id='374' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d374' /><marker id='375' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d375' /><marker id='376' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d376' /><marker id='377' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d377' /><marker id='378' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d378' /><marker id='379' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d379' /><marker id='380' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d380' /><marker id='381' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d381' /><marker id='382' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d382' /><marker id='383' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d383' /><marker id='384' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d384' /><marker id='385' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d385' /><marker id='386' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d386' /><marker id='387' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d387' /><marker id='388' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d388' /><marker id='389' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d389' /><marker id='390' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d390' /><marker id='391' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d391' /><marker id='392' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d392' /><marker id='393' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d393' /><marker id='394' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d394' /><marker id='396' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d396' /><marker id='397' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d397' /><marker id='398' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d398' /><marker id='399' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d399' /><marker id='402' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d402' /><marker id='403' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d403' /><marker id='404' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d404' /><marker id='405' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d405' /><marker id='406' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d406' /><marker id='408' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d408' /><marker id='1072' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d1072' /><marker id='1074' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d1074' /><marker id='1180' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d1180' /><marker id='1181' shapeId='circle' link='..%2fPageClubInformation%2fDefault.aspx%3fclubid%3d1181' /></application></markers></map>");

chart_myTable.render("myTableDiv");

</script>

<!-- END Script Block for Chart myTable -->

 

Thanks and need you help..

Share this post


Link to post
Share on other sites

Hi,

Could you please try setDataURL() where you need to just pass the URL of the XML generator script? This way you can skip all post back code that you might be using and re-rendering of the map. Rather, you just need to specify the url and let map handle the post back of XML data and re-draw map.

Share this post


Link to post
Share on other sites

If you could show me an example on how to do, it will be a great help for me. I really do not know how to actually implement at this point. And moreover, this script is generated during runtime from the code-behind.

 

 

 

Thanks

Edited by Guest

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

In case you wish to pass the XML data to the map using setdataURL method, please try including the file in your application and then please try using the code mentioned below to the map:

Ref.- LiteralID.Text = FusionCharts.RenderChart("../PowerMaps/FCMap_France.swf", "../PowerMaps/data.xml", "", "chart2", "350", "250", false, true);

Here data.xml is the file that contains the XML data to be passed to the map.

Hope this helps. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this