|
|
|
Forum Member
      
Group: Forum Members
Last Login: 8/26/2008 8:21:01 PM
Posts: 43,
Visits: 74
|
|
After a lot of debugging, I have found that FusionCharts needs some strings double escaped.
I am not sure if this is Javascript and/or Browser bug and/or Fusion Flash implementation.
As string like this:
http://helpdesk/Search/Chart.html?Order=DESC&Query=+Owner+
%3D+%27Nobody%27+AND+%28+Status+%3D+%27new%27+OR+
Status+%3D+%27open%27%29+AND+Queue+%3D+%27TSE%27&
Rows=20&OrderBy=Created&Format=%27%3Ca+href%3D%22%2FTicket
%2FDisplay.html%3Fid%3D__id__%22%3E__id__%3C%2Fa%3E%
2FTITLE%3A%23%27%2C+%27%3Ca+href%3D%22%2FTicket%
2FDisplay.html%3Fid%3D__id__%22%3E__Subject__%3C%2Fa
%3E%2FTITLE%3ASubject%27%2C+QueueName%2C+ExtendedStatus
%2C+CreatedRelative%2C+%27%3CA+HREF%3D%22%2FTicket%
2FDisplay.html%3FAction%3DTake%26id%3D__id__%22%3ETake%
3C%2Fa%3E%2FTITLE%3A%26nbsp%3B%27+&PrimaryGroupBy=
Status&ChartStyle=bar
Needs to be escaped two times in the process of passing the string to FustionCharts.
|
|
|
|
|
FusionCharts Team
      
Group: Administrators
Last Login: Yesterday @ 8:20:12 AM
Posts: 2,194,
Visits: 521
|
|
Hi,
Can you switch the debug mode of chart to on - to see what the chart is getting from browser?
Thanks, Pallav Nadhani FusionCharts Team
|
|
|
|
|
Forum Member
      
Group: Forum Members
Last Login: 8/26/2008 8:21:01 PM
Posts: 43,
Visits: 74
|
|
I have posted the solution to complected string like the example above.
Escaping the string once gives invalid data error, something to point of try escaping the string.
|
|
|
|
|
FusionCharts Team
      
Group: Administrators
Last Login: Yesterday @ 8:20:12 AM
Posts: 2,194,
Visits: 521
|
|
Can you paste the contents of your debug window?
Thanks, Pallav Nadhani FusionCharts Team
|
|
|
|
|
Forum Member
      
Group: Forum Members
Last Login: 8/26/2008 8:21:01 PM
Posts: 43,
Visits: 74
|
|
Not sure why the content would make any difference, the string when passing it to the Javascript is the problem.
[text]
[/text]
I can't get the text for the XML to printout, do we have a tag available like verbatim or code in the Forumns?
Here is my Javascript:
function draw_chart(type,webpath,query,w,h,debug)
{
var width = 800, height = 560;
try {
if(w != undefined) {
width = w;
}
if(h != undefined) {
height = h;
}
//var chart1 = new FusionCharts("/NoAuth/charts/Column3D.swf", "RTDynamicChart", width, height, debug, "0");
var chart1 = new FusionCharts(type, "RTDynamicChart", width, height, debug, "0");
chart1.setDataURL( webpath + escape(escape(query)) );
chart1.render("fusion_chart");
} catch(e) {
alert("ERROR: " + e);
}
}
|
|
|
|
|
Forum Member
      
Group: Forum Members
Last Login: 8/26/2008 8:21:01 PM
Posts: 43,
Visits: 74
|
|
Here is the debug window when I only escape once:
Info: Chart loaded and initialized.
Initial Width: 800
Initial Height: 560
Scale Mode: noScale
Debug Mode: Yes
Application Message Language: EN
Version: 3.0.3
Chart Type: Multi Series 3D Column Chart
Chart Objects:
BACKGROUND
CANVAS
CAPTION
SUBCAPTION
YAXISNAME
XAXISNAME
DIVLINES
YAXISVALUES
DATALABELS
DATAVALUES
TRENDLINES
TRENDVALUES
DATAPLOT
TOOLTIP
VLINES
LEGEND
INFO: XML Data provided using dataURL method.
dataURL provided: /Search/ChartFusion.xml?Rows=50&SecondaryGroupBy=ResolvedMonthly&PrimaryGroupBy=CreatedMonthly&Format=%20%20%20%3Cb%3E%3Ca%20href%3D%22%2FTicket%2FDisplay.html%3Fid%3D__id__%22%3E__id__%3C%2Fa%3E%3C%2Fb%3E%2FTITLE%3A
dataURL invoked:
|
|
|
|
|
Forum Member
      
Group: Forum Members
Last Login: 8/26/2008 8:21:01 PM
Posts: 43,
Visits: 74
|
|
Here is what works for all of our charts:
Info: Chart loaded and initialized.
Initial Width: 800
Initial Height: 560
Scale Mode: noScale
Debug Mode: Yes
Application Message Language: EN
Version: 3.0.3
Chart Type: Single Series 3D Column Chart
Chart Objects:
BACKGROUND
CANVAS
CAPTION
SUBCAPTION
YAXISNAME
XAXISNAME
DIVLINES
YAXISVALUES
DATALABELS
DATAVALUES
TRENDLINES
TRENDVALUES
DATAPLOT
TOOLTIP
VLINES
INFO: XML Data provided using dataURL method.
dataURL provided: /Search/ChartFusion.xml?Rows%3D50%26SecondaryGroupBy%3D%26PrimaryGroupBy%3DCreatedAnnually%26Format%3D%27%2520%2520%2520%253Cb%253E%253Ca%2520href%253D%2522%252FTicket%252FDisplay.html%253Fid%253D__id__%2522%253E__id__%253C%252Fa%253E%253C%252Fb%253E%252FTITLE%253A
dataURL invoked:
|
|
|
|