NOTE: < and > don't appear to be allowed within my code sections, so I've had to strip them out....mildly ironic considering the nature of my query! LOL
Hi All,
I'm using FusionCharts in an VB.NET 1.1 (don't laugh!) application and need to render some tool tips as multi line. I've followed the guidance of setting up a style:
style type='font' name='myHTMLFont' isHTML='1'
and using:
apply toObject='TOOLTIP' styles='myHTMLFont'
to apply it.
Unforuntately, when I come to call the chart I'm given an 'Invalid XML data' error. I'm confident that it's the rendering of the <BR> aspect, as when I remove this, the chart displays fine but with my tooltip on one line.
An extract of the vb used to create my xml string is below, whilst I'm looping through a dataset, i use the following:
xmlData = xmlData & "set label='"
xmlData = xmlData & row("Lactation_Number").ToString()
xmlData = xmlData & "' value='"
xmlData = xmlData & row("Percent_Lame").ToString()
xmlData = xmlData & "' toolText='"
xmlData = xmlData & "Cows in lactation: " & row("Num_In_Lactation").ToString() & " <BR> Cows lame in lactation: " & row("Lame_Number").ToString()
xmlData = xmlData & "'/"
As can be seen, it's pretty simple, but this chucks me the 'invalid XML data' message when run. I did a quick view source on the xml produced in the website whilst this error is present and I see the following:
chart_chart1.setDataXML("chart caption='Lameness percentage by lactation' xAxisName='Lactation Number' yAxisName='%25 Lame' numberSuffix='%25' showValues='0' showBorder='1' yAxisMaxValue='100' bgColor='eeeeee' bgAlpha='50' canvasBgColor='eeeeee' canvasBgAlpha='50'
styles
definitionstyle type='font' name='CaptionFont' color='666666' size='15'/
style type='font' name='SubCaptionFont' color='666666'/
style type='font' name='myHTMLFont' isHTML='1' color='ff0000'//
definitionapplicationapply toObject='caption' styles='CaptionFont'/
apply toObject='SubCaption' styles='SubCaptionFont'/
apply toObject='TOOLTIP' styles='myHTMLFont' //
application
/styles
set label='1' value='10' toolText='Cows in lactation: 20 <BR> Cows lame in lactation: 2'/set label='2' value='11' toolText='Cows in lactation: 27 <BR> Cows lame in lactation: 3'/
etc etc
It should be noted that what is shown as br on this forum page, displays as the html lt; code when my xml is output to browser
Obviously this extract doesn't include the chart header or the rest of the data, but it implies that the style and applyto are being placed in correctly, what I'm concerned about is that at the point of xml generation the left and right spiky brackets still appear as their html codes, but the browser does not seem to be rendering them as such.
Any ideas? as I've been puzzled on this one for a while now!