fovnyc

Display Category Column With Quote

Recommended Posts

Hi,

 

I created a query which get names that I'd like to display as category column, but some of the names have a single quote in them and FusionCharts doesn't seem to deal with it (gives a 'Invalid XML data' error).

Should I use the replace function somewhere, or is there an option for this?

 

Many thanks

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Welcome to FusionCharts Forum! smile.gif

You can directly embed most of the special characters and punctuation marks in the XML/JSON data source of your chart. However, &, <, >, ' (apostrophe) and "(quote) need to be specially encoded when providing the same as a part of the chart data. Apart from this, there is no need to encode any other special character.

 

To display the " (double-quotation or quotes) character on a chart, is recommended to encode it as " It is applicable in both Data URL and Data String methods.

 

More details at: http://www.fusioncha...unctuation.html

 

Hope this helps.

Share this post


Link to post
Share on other sites

Hi,

 

Welcome to FusionCharts Forum! smile.gif

You can directly embed most of the special characters and punctuation marks in the XML/JSON data source of your chart. However, &, <, >, ' (apostrophe) and "(quote) need to be specially encoded when providing the same as a part of the chart data. Apart from this, there is no need to encode any other special character.

 

To display the " (double-quotation or quotes) character on a chart, is recommended to encode it as " It is applicable in both Data URL and Data String methods.

 

More details at: http://www.fusioncha...unctuation.html

 

Hope this helps.

 

 

Dear Angshu,

 

Many thanks for your reply, but the name with single quote comes from a SQL query in my .asp file.

Which file should I modify to encode this description?

 

Cheers,

TG

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Could you please send us the code where you are facing this issue?

 

Awaiting for your response.

Share this post


Link to post
Share on other sites

Hi,

 

Could you please send us the code where you are facing this issue?

 

Awaiting for your response.

 

Sure, thanks!

 

Here it is. It's a simple SQL query in a Dreamweaver CS4 recordset:

 

"SELECT DISTINCT tclCustomers.CustomerName, SUM(tblARInvoiceDetailTemp.Quantity) AS sumquant

FROM tblCustomers, tblARInvoiceDetailTemp

WHERE tblCustomers.CustomerID=tblARInvoiceDetailTemp.CustomerID

GROUP BY tblCustomers.CustomerName"

 

The problem is that in the table tblCustomers, the field CustomerName contains names like "John's Pizzeria", with a single quote.

When I create a FusionCharts chart, it takes the field CustomerName as category, but is unable to display it properly as there is a single quote in some of the names.

 

I tried to modify the DWFChart.inc.asp file with the replace(string, " ' ", " ' ' ") function, but it still doesn't work.

 

Many thanks for your help!

Cheers,

TG

Share this post


Link to post
Share on other sites

Hello :) Any recommendations?

Thanks!

TG

 

Hi,

 

Could you please send us the code where you are facing this issue?

 

Awaiting for your response.

Share this post


Link to post
Share on other sites

Dear Angshu,

 

I sent you the code, I was wondering if you'd have a solution for the quote problem.

 

Many thanks,

TG

 

 

Hi,

 

Could you please send us the code where you are facing this issue?

 

Awaiting for your response.

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