You need to decode the URL in the GetParameter function:

function GetParameter(name) {
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp(regexS);
var uri = decodeURIComponent(window.location.href);
var results = regex.exec(uri);
if (results === null ) {return emptyParameter;} else {return results[1];}
}

On Tuesday, May 7, 2013 3:55:54 PM UTC-4, Ken Neumann wrote:
>
> <html>
> <head>
>  <style type="text/css">
>   #chartDiv {
>    overflow: hidden;
>    position: absolute;
>    top: -5px;
>    left: 0px;
>   }
>  </style>
>  
>  <script type="text/javascript" src="
> https://www.google.com/jsapi";></script>
>  <script type="text/javascript">
>  // Set the clear function
>   window.onbeforeunload = ClearThisChart;
>
>  // Get the parameters
>   chartXAxis = GetParameter("x-Axis");
>   arrayXAxis = chartXAxis.split(";");
>   valueBrand = GetParameter("Brand");
>   valueGen  = GetParameter("Gen");
>   chartTitle = GetParameter("Title");
>
>   // Draw the google chart
>   google.load("visualization", "1", {packages:["corechart"]});
>   google.setOnLoadCallback(drawChart);
>   function drawChart() {
>    var data = new google.visualization.DataTable();
>    data.addColumn('string', 'Category');
>    data.addColumn('number', 'Scripts');
>    data.addRow([arrayXAxis[0], parseInt(valueBrand)]);
>    data.addRow([arrayXAxis[1], parseInt(valueGen)]);
>   
>    var h=400;
>    var w=500;
>    var options = {
>     width: w, 
>     height: h, 
>     legend: {position: 'bottom'},
>     is3D: true,
>     title: chartTitle, 
>     titleTextStyle: {fontSize: 20, italic: false, bold: true},
>     tooltip: {isHtml: true}
>    };
>
>    var chart = new 
> google.visualization.PieChart(document.getElementById('chartDiv'));
>    chart.draw(data, options);
>    //chart.getChart().clearChart();
>   }
>
>   // Retrieve a parameter from the URL
>   function GetParameter(name) {
>    name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
>    var regexS = "[\\?&]"+name+"=([^&#]*)";
>    var regex = new RegExp(regexS);
>    var results = regex.exec(window.location.href);
>    if (results === null ) {return emptyParameter;} else {return 
> results[1];}
>   }
>   
>   // Free chart resources
>   function ClearThisChart() {
>    //chart.getChart().clearChart();
>   }
>  </script>
> </head>
> <body>
> <div id="chartDiv"></div>
> </body>
> </html>
> On Tuesday, May 7, 2013 1:41:39 PM UTC-6, asgallant wrote:
>
>> If you post your code,  I'll take a look and see what might be the 
>> problem.
>>
>> On Tuesday, May 7, 2013 3:34:56 PM UTC-4, Ken Neumann wrote: 
>>>
>>> Since using IE 9 there are escape characters that display when my graphs 
>>> are executed.   In the URL being passed there are spaces, so the output is 
>>> like this:   Total%20Fills%20201609
>>>  
>>> My graph displays perfectly in IE 8 using the same HTML.   
>>>  
>>> Total Fills: 1609  
>>>  
>>> Please Help
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to