Jump to content
Software FX Community

XML Properties and URL()


User (Legacy)
 Share

Recommended Posts

Hey all,

I've noticed that passing in URL information in XML doesn't work properly.

Here is the sample: To get the chart to work properly, you have to

un-comment the lines at the bottom, and remove all the URL( properties from

the xmlProps.

Does somebody have any idea when this will be fixed?

Thanks,

Marc Batchelor

<!-- Include this file so we can use all the ChartFX constants -->

<!-- #include virtual="/Include/CfxIE.inc" -->

<%

Dim xmlProps, xmlData

xmlProps = "<?xml version=""1.0""?> "

xmlProps = xmlProps + "<CHARTFX> "

xmlProps = xmlProps + " <PROP NAME=""TypeMask""

VALUE=""1183318018""/>"

xmlProps = xmlProps + " <PROP NAME=""LeftGap"" VALUE=""5""/>"

xmlProps = xmlProps + " <PROP NAME=""Title(0)"" VALUE=""Units""/>"

xmlProps = xmlProps + " <PROP NAME=""Title(2)"" VALUE=""Product Sales

by Quarter""/>"

xmlProps = xmlProps + " <PROP NAME=""URLOptions"" Value=""24""/>"

xmlProps = xmlProps + " <PROP NAME=""URLParamMask""

Value=""Measure=Sales&Quarter=%s""/>"

xmlProps = xmlProps + " <PROP NAME=""URL(0)""

Value=""http://www.test.com?Product=ChartFX+98&Scenario=Actual""/>"

xmlProps = xmlProps + " <PROP NAME=""URL(1)""

Value=""http://www.test.com?Product=ChartFX+IE+3.5&Scenario=Budget""/>"

xmlProps = xmlProps + " <PROP NAME=""URL(2)""

Value=""http://www.test.com?Product=ReportFX&Scenario=Actual""/>"

xmlProps = xmlProps + " <PROP NAME=""URL(3)""

Value=""http://www.test.com?Product=Image+Toppings&Scenario=Budget""/>"

xmlProps = xmlProps + " <PROP NAME=""URL(4)""

Value=""http://www.test.com?Product=ChartFX+IE+2000&Scenario=Actual""/>"

xmlProps = xmlProps + " <PROP NAME=""URL(5)""

Value=""http://www.test.com?Product=WebBarFX&Scenario=Budget""/>"

xmlProps = xmlProps + " <PROP NAME=""URL(6)""

Value=""http://www.test.com?Product=WebTreeFX&Scenario=Actual""/>"

xmlProps = xmlProps + " <OBJECT NAME=""Axis(2)"">"

xmlProps = xmlProps + " <OBJECT NAME=""Font"">"

xmlProps = xmlProps + " <PROP NAME=""Name"" VALUE=""Verdana""/>"

xmlProps = xmlProps + " <PROP NAME=""Size"" VALUE=""6""/>"

xmlProps = xmlProps + " </OBJECT>"

xmlProps = xmlProps + " <PROP NAME=""LabelAngle"" VALUE=""45""/> "

xmlProps = xmlProps + " </OBJECT> "

xmlProps = xmlProps + "</CHARTFX>"

xmlData = xmlData + "<?xml version=""1.0""?>"

xmlData = xmlData + "<DATA> "

xmlData = xmlData + "<COLUMNS>"

xmlData = xmlData + "<COLUMN NAME=""Product"" TYPE=""String""/>"

xmlData = xmlData + "<COLUMN NAME=""Scenario"" TYPE=""String""/>"

xmlData = xmlData + "<COLUMN NAME=""Q1"" TYPE=""Integer""/>"

xmlData = xmlData + "<COLUMN NAME=""Q2"" TYPE=""Integer""/>"

xmlData = xmlData + "<COLUMN NAME=""Q3"" TYPE=""Integer""/>"

xmlData = xmlData + "<COLUMN NAME=""Q4"" TYPE=""Integer""/>"

xmlData = xmlData + "</COLUMNS>"

xmlData = xmlData + "<ROW Product=""ChartFX 98"" Scenario=""Actual""

Q1=""9200"" Q2=""7835"" Q3=""10245"" Q4=""8762""/>"

xmlData = xmlData + "<ROW Product=""ChartFX IE 3.5""

Scenario=""Budget"" Q1=""14350"" Q2=""11233"" Q3=""16754"" Q4=""15672""/>"

xmlData = xmlData + "<ROW Product=""ReportFX"" Scenario=""Actual""

Q1=""12398"" Q2=""7654"" Q3=""5678"" Q4=""9087""/>"

xmlData = xmlData + "<ROW Product=""Image Toppings""

Scenario=""Budget"" Q1=""8742"" Q2=""12358"" Q3=""14321"" Q4=""8702""/>"

xmlData = xmlData + "<ROW Product=""ChartFX IE 2000""

Scenario=""Actual"" Q1=""15672"" Q2=""17529"" Q3=""16524"" Q4=""7654""/>"

xmlData = xmlData + "<ROW Product=""WebBarFX"" Scenario=""Budget""

Q1=""6890"" Q2=""12389"" Q3=""9804"" Q4=""10723""/>"

xmlData = xmlData + "<ROW Product=""WebTreeFX"" Scenario=""Actual""

Q1=""11320"" Q2=""12908"" Q3=""6521"" Q4=""7590""/>"

xmlData = xmlData + "</DATA>"

Set chart = Server.CreateObject("ChartFX.WebServer")

' The samples look better in white

chart.RgbBk = RGB(255,255,255)

' Create the XML data provider object

Set SfxXMLProp = Server.CreateObject("SfxXMLData.XMLData")

' Establish the name of the tags. If you ommit to do it these will

be the default values.

SfxXMLProp.BagTagName = "PROP"

SfxXMLProp.BagAttrName = "NAME"

SfxXMLProp.BagAttrValue = "VALUE"

SfxXMLProp.BagTagObject = "OBJECT"

Set SfxXMLVal = Server.CreateObject("SfxXMLData.XMLData")

SfxXMLVal.BagTagName = "PROP"

SfxXMLVal.BagAttrName = "NAME"

SfxXMLVal.BagAttrValue = "VALUE"

SfxXMLVal.BagTagObject = "OBJECT"

SfxXMLVal.LoadFromString xmlData

' Standard Chart FX's method for retrieving data of a data provider

Chart.GetExternalData SfxXMLVal

' Load props AFTER loading data - this allows the font stuff to be

used...

SfxXMLProp.LoadFromString xmlProps

Chart.GetExternalData SfxXMLProp

Chart.recalcScale()

tipMaskStr = "%s: " + chr(10) + chr(13) + "%v"

chart.TipMask = tipMaskStr

'

' The URLs dont work when supplied in the XML shown above.

' Instead, you have to use this

'

' chart.URLOptions = 24

' chart.URLParamMask = "Measure=Sales&Quarter=%s"

' chart.URL(0) =

"http://www.test.com?Product=ChartFX+98&Scenario=Actual"

' chart.URL(1) =

"http://www.test.com?Product=ChartFX+IE+3.5&Scenario=Budget"

' chart.URL(2) = "http://www.test.com?Product=ReportFX&Scenario=Actual"

' chart.URL(3) =

"http://www.test.com?Product=Image+Toppings&Scenario=Budget"

' chart.URL(4) =

"http://www.test.com?Product=ChartFX+IE+2000&Scenario=Actual"

' chart.URL(5) = "http://www.test.com?Product=WebBarFX&Scenario=Budget"

' chart.URL(6) = "http://www.test.com?Product=WebTreeFX&Scenario=Actual"

%>

<%= chart.GetHtmlTag(600,400,"Image") %>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...