CFCHART chart flash - formatted xml
I have two cards each that are generated using the tag cfchart - creating a graph in flash. To get the look of the end of the map I want, I use an xml file to handle some of the formatting. This fine all worked for me until last week when I went to a crappy host to a new host good. You can see that the two charts HERE the top graph works fine, but the graphic background batteries (controlled by a different xml file) monthly results superimposed - why?Note: the results appear after each other instead of stacked - if I take the line 'style' in the cfchart part, so it tells me that it is the xml file that is paramount, but I don't know why.
CFCODE of the second graph:
< cfchart format = "swf".
style="/XML/monthlyDistanceGraphs.xml".
chartheight = '125 '.
chartwidth = '575 '.
ForegroundColor = "000000".
yaxistitle = "mileage".
URL = "JavaScript:popUp('walksMonth.cfm?month=$ItemLabel$'); ">
< cfchartseries type = 'bar '.
Query = "yearlyChart."
ValueColumn = "yrDistance."
PostesColonne = "walkDate".
SeriesColor = "ff0000" >
< / cfchartseries >
< / cfchart >
The second chart XML:
<? XML version = "1.0" encoding = "UTF-8"? >
< frameChart is3D = "no" >
< type xAxis = "DateTime" >
< style labelFormat = "DateTimePattern" reason = "MMM" / >
< parseFormat style = "DateTimePattern" reason = "yyyy-MM-DD hh: mm:" / >
< dateTimeStyle majorUnit = 'Months' minorUnit = 'Months' / >
< isMultiline labelStyle = "false" isHideOverlapped = "true" / >
< / xAxis >
< scaleMin yAxis = '0' scaleMax = "80" >
< labelFormat pattern = "#, # 0" ###" / >
< parseFormat pattern = "#, # 0" ###" / >
< isMultiline labelStyle = "false" / >
< / yAxis >
< legend isVisible = "false" / >
< background minColor = "#dddddd" / >
< background popup = 'white' in the foreground 'black' = / >
< paint isVertical = min = '25' max "75" = "true" / >
< elements fixedWidth = "40" >
< morph morph = 'growing up' / >
< index collection = "0" >
<! [CDATA [$(value) miles]] >
< / series >
< / items >
< / frameChart >
Quote:
Posted by: jkgiven
XML file as follows:...I just get the month of request:
SELECT sum (distance) AS yrDistance, month (walkDate)
... ...
...In my first cfdump (under monthlyChart) data appears in the format 2006-10 - 0100:00:00.0 but in my PB, it's 01/10/2006 - I should change it's 2006-10-01?
First of all, it looks like you are using MS Access, dates DB shows you as '01/10/2006' because that's how Bill Gates thinks that a Red blooded American wants to see them.
It stores dates in a code which translates by "2006-10 - 0100:00:00.0.
You don't need to change anything there, just be wary of what's going on.
The XML file looks OK now.
It seems that the last problem is that
Modify your query to: Then change your chartseries to:
SELECT
SUM (distance) AS yrDistance
, MONTH (walkDate) AS walkMonth
Of
bockWalk
WHERE
YEAR (walkDate) = #year (Now ()) #.
GROUP BY
MONTH (walkDate)
<>
type = 'bar '.
Query = "yearlyChart."
ValueColumn = "yrDistance."
PostesColonne = "walkMonth".
SeriesColor = "ff0000".
>
Tags: ColdFusion
Similar Questions
-
Tag format XML (data)
Hello
y at - it a utility or an editor, that can format XML data automatically.
in fact, I understand the hierarchy of xml data, for this I need manually align the xml tag.
See the following link, it can help you.
http://geek.sylvainw.com/2010/03/28/using-Notepad-to-quickly-format-XML/
-
Trying to Flash format to export composition. How?
Trying to Flash format to export composition. How?
The most recent version of cloud don't give me the option to export to the flv format.
Why do they want to export to the FLV format? Flash Player can play other and higher, more recent formats such as .mp4, you can export using Adobe Media Encoder.
Details:
export FLV and F4V removal characteristics of Adobe Media Encoder, After Effects and Premiere Pro
-
Variable format using link in the form of flash format
Greetings
Everything seems like a simple question, I seem to be missing something here. I have a form (in flash format) which calculates a value when a form element is selected. The value is actually a monetary value. Output the value of the variable in a cfformitem but I con ' t understand how diplay as a dollor appreciates, in addition, a value with zeros to the right when the value is a full dollar.
For example:
The amount of $1,00 displayed as 1 (I add the dolloar sign)
or $23.80 displayed in 23.8
Code below:
< cfif
IsDefined()"Form.Submit"()>
Total cost:
< cfoutput > #form. TotalCost #< / cfoutput >< br / >
< / cfif >
< cfform
format ="Flash">
< cfformitem
type="script">
var cost = ";
var p1 = 40.50;
var p2 = 29.75;
service cost (): Void
{
load = 0;
the share price
If {(specialneeds.value is true)
If {(Session1.value == 1)
load (load + p2) =;
}
If {(Session2.value == 1)
load (load + p2) =;
}
If {(Session3.value == 1)
load (load + p2) =;
}
}
price double
else {}
If {(Session1.value == 1)
load = (load + p1);
}
If {(Session2.value == 1)
load = (load + p1);
}
If {(Session3.value == 1)
load = (load + p1);
}
}
}
< / cfformitem >
< cfinput type ="checkbox" label ='Sharing'? nom =« specialneeds » valeur =« vrai » vérifié =« Non » onClick =« cost() » / >
< cfinput type="checkbox" label="Day 1" value="1" name="Session1" onClick="cost()" id="Session1" />
< cfinput type="checkbox" label="Day 2" value="1" name="Session2" onClick="cost()" id="Session2" />
< cfinput type ="checkbox" label ="Day 3" value ="1" name ="Session3" onClick ="cost()" id ="Session3" / >
< cfformitem link ="Total cost: ${costs} ' style =" color: red; " type ="text"> < / cfformitem >
< cfinput type =« cachés » id =« PrixTotal » nom =« PrixTotal » lier =« {charge} » / >
< cfinput type ="submit" id ="submit" name ="submit" Label ="Submit" value ="Submit" / >
< / cfform >
Any ideas how I can get around this?Thanks for any input.
As far as I know, Actionscript is not as formatting numbers. You will need to make your own. Something like this:
costs of var = 0;
var integerPart = 0;
var decimalPart = 0;
var decimalPartWithoutPoint = '0 '.
service cost (): Void
{
load = 1;
load = Math.Round (load * 100) / 100;
integerPart = Math.floor (load);
decimalPart = load - integerPart;
If (decimalPart! = 0) decimalPartWithoutPoint = decimalPart.toString (.split(".")) [1] ;
If (decimalPart == 0 | decimalPartWithoutPoint.length == 1) fees = integerPart.toString () + "." + decimalPartWithoutPoint + "0";
}
-
Flash and XML help:)
Hi all
bit of a newbie, so probably pretty easy if you know how to: eek:
would we beable to help unravel a XML file, what I have is a ToolTip that load in via XML and exported from flash. the XML support in 2 text, field and field2 fields.
what I'm trying to do is to add a touch to the balloon so that you can click and go to a url.
would we beable to help with this.
That's what I have in my XML file;
<? XML version = "1.0" encoding = "utf-8"? >
< data >
< image name = "image 1" path = img/img1.jpg"".
title = 'Food Fight'
Text = "Information here!" / >< / data >
This loads in 2 text fields.
That's what I have in my ACE;
var tooltip:ToolTip = new ToolTip();
tooltip.buttonMode = false;
ToolTip.Field.Text = title; loads of ToolTip 1
ToolTip.Field2.Text = text; loads ToolTip 2
holder.addChild (tooltip);I thought I could do something like that, but I seem to be errors
XML
<? XML version = "1.0" encoding = "utf-8"? >
< data >
< image name = "image 1" path = img/img1.jpg"".
title = 'Food Fight'
Text = "Information here!
button = "click to see / >"< / data >
and in my ACE
var tooltip:ToolTip = new ToolTip();
tooltip.buttonMode = false;
ToolTip.Field.Text = title; loads of ToolTip 1
ToolTip.Field2.Text = text; loads ToolTip 2
ToolTip.field3.Text = buttons; loads ToolTip 3
holder.addChild (tooltip);
but doesn't do not, what I'm doing wrong: Oops:Thanks much for any help!
Hello
Here is the code:
var imageName:String = images[i].@name;
var imagePath:String = images[i].@path;
var title: String = images[i].@title;
the var text: String = images[i].@text;
movies of the var: String = images[i].@swf; added 24 Aug - 09
buttons of the var: String = images[i].@button;
var tooltip:ToolTip = new ToolTip();
ToolTip.Field.Text = title; charges of 1 balloon
ToolTip.Field2.Text = text; support for ToolTip 2
ToolTip.field3.Text = buttons;
Don't forget to embed the font for the field3.text
Saransoft
-
skip the menu + cfform flash format (no luck @ rich forms!)
Hello! I'm kind of new cfform and format flash, maybe someone could help me with the following:
When a user clicks a cfselect I want to select an item then sends a few vars on the same page, I've tried it with the usual: onChange = "MM_jumpMenu ('parent', this, 1) ' but it doesn't seem to work with cfform and flash format, someone knows how to make a cfselect rerouting menu in flash cfform format?"FACT! Here is the link: http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=1&catid=22&threadid=1 239365 & enterthread = y
-
skip the menu + cfform and flash format
Hello! I'm kind of new cfform and format flash, maybe someone could help me with the following:
When a user clicks a cfselect I want to select an item then sends a few vars on the same page, I've tried it with the usual: onChange = "MM_jumpMenu ('parent', this, 1) ' but it doesn't seem to work with cfform and flash format, someone knows how to make a cfselect rerouting menu in flash cfform format?"FACT! If you want to read the answer to this, go to: "cfselect and getURL with a parameter" posted @ ColdFusion and Flash integration, the answer would be: onChange = "getURL ("changedepartment.cfm? onedepartment = "(+ department.selectedItem.data);" where "Department." is the name of the cfselect! " Thank you so much scarecrow! Here is the link: http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=1&catid=138&threadid= 1154089 & highlight_key = y & keyword1 = cfselect
-
Validation of the CFSELECT as Flash format
In the past, I used the Javascript validation in CFFORMs to validate the CFSELECT of entry, due to the bug in Coldfusion validation (most of my client sites are on shared servers, so I can't change the cfform.js file).
The Javascript code, I found a place worked very well:
<! - validation functions - >
< SCRIPT LANGUAGE = "JavaScript" >
function ExtendJS (FormName) {}
If (!.) {SingleSelectRequired (FormName, 'Event_Description'))}
Alert ("you must select a provider from the drop-down list.");
Returns false;
}
}
function
{SingleSelectRequired (shape, field)
var itemSelected =
eval ("document." + form + ".")
+ Field + 'SelectedIndex');
If (itemSelected == 0) {}
Returns false;
} else {}
Returns true;
}
}
< /script >
Then, in my CFFORM Tag:
< cfform
name = "formName".
action = "index.cfm? section = 4 & offer = 1".
preservedata = "Yes".
enctype = "multipart/form-data".
method = "POST".
format = "HTML".
onSubmit = "return ExtendJS ('FormName')" >
Now, I'm looking to determine the CFFORM format = "Flash"... Well, not only explore, way down the road to develop a web app... and I found my old validation methods do not work. It seems that I have to use Actionscript now.
Does anyone have a good implementation of Actionscript form validation that they can share with me? Or point me in a different direction if I'm off base here?
Thank you
MaxIt is difficult for me to believe that I'm the only one who had problems with the CFFORM = validation of the cfselect "flash" format But hours of searching turned up VERY LITTLE. I managed to combine something, then someone else has this problem, that happens on my post, here's how I solved it:
perform the validation client side here if you want to
validationError var = 'False ';
var myString = "Please select a value for the following:";
var alertTitle = "necessary input data;
If (theForm.testSelect.value is "none")
{
validationError var = 'True ';
var myString = myString + "Place,";
}
If (theForm.testSelect2.value is "none")
{
validationError var = 'True ';
var myString = myString + "Option2,";
}
If (validationError is 'True')
{
Alert (MyString, alertTitle);
Returns false;
}
-
I am creating a report XML Pub for PeopleSoft and must have 3 cards. I'm running into all sorts of problems and I think it's because my XML (more precisely the skills listed more than once). Here is my XML. I am trying to create a stacked bar chart.
<? XML version = "1.0" encoding = "utf-8"? >
< root >
< PLXSVGRAPH >
< SKILL >
Leadership of < COMPETENCY_NAME > < / COMPETENCY_NAME >
< EMPLOYEE > 2.5 < / EMPLOYEE >
< MANAGER > 2.7 < / MANAGER >
< > 2.7 PEER < / PEER >
< MATRIX_MANAGER > 2.7 < / MATRIX_MANAGER >
< DIRECT_REPORT > 2.7 < / DIRECT_REPORT >
< / SKILLS >
< SKILL >
Courage to < COMPETENCY_NAME > < / COMPETENCY_NAME >
< EMPLOYEE > 2.5 < / EMPLOYEE >
< MANAGER > 2.7 < / MANAGER >
< > 2.7 PEER < / PEER >
< MATRIX_MANAGER > 2.7 < / MATRIX_MANAGER >
< DIRECT_REPORT > 2.7 < / DIRECT_REPORT >
< / SKILLS >
< / PLXSVGRAPH >
< PLXSLCGRAPH >
< SKILL >
Leadership of < COMPETENCY_NAME > < / COMPETENCY_NAME >
< EMPLOYEE > 2.5 < / EMPLOYEE >
< MANAGER > 2.7 < / MANAGER >
< > 2.7 PEER < / PEER >
< MATRIX_MANAGER > 2.7 < / MATRIX_MANAGER >
< DIRECT_REPORT > 2.7 < / DIRECT_REPORT >
< / SKILLS >
< SKILL >
Courage to < COMPETENCY_NAME > < / COMPETENCY_NAME >
< EMPLOYEE > 2.5 < / EMPLOYEE >
< MANAGER > 2.7 < / MANAGER >
< > 2.7 PEER < / PEER >
< MATRIX_MANAGER > 2.7 < / MATRIX_MANAGER >
< DIRECT_REPORT > 2.7 < / DIRECT_REPORT >
< / SKILLS >
< / PLXSLCGRAPH >
< PLXSKJAGRAPH >
< SKILL >
Leadership of < COMPETENCY_NAME > < / COMPETENCY_NAME >
< EMPLOYEE > 2.5 < / EMPLOYEE >
< MANAGER > 2.7 < / MANAGER >
< > 2.7 PEER < / PEER >
< MATRIX_MANAGER > 2.7 < / MATRIX_MANAGER >
< DIRECT_REPORT > 2.7 < / DIRECT_REPORT >
< / SKILLS >
< SKILL >
Courage to < COMPETENCY_NAME > < / COMPETENCY_NAME >
< EMPLOYEE > 2.5 < / EMPLOYEE >
< MANAGER > 2.7 < / MANAGER >
< > 2.7 PEER < / PEER >
< MATRIX_MANAGER > 2.7 < / MATRIX_MANAGER >
< DIRECT_REPORT > 2.7 < / DIRECT_REPORT >
< / SKILLS >
< / PLXSKJAGRAPH >
< / root >
Here is my XML table for just 1 chart:
chart:
< graph graphType = "BAR_VERT_CLUST" >
< LegendArea visible = "true" automaticPlacement = "AP_NEVER" position = "LAP_RIGHT" / >
< title text = "Plexus values" visible = "true" horizontalAlignment = "CENTER" / >
< Y1ReferenceLine >
< ReferenceLine index = "0" visible = "true" lineWidth = '2' text = 'Exceptional' value = '3' lineColor = "#ff00" / >
< ReferenceLine index = "1" visible = "true" lineWidth = '2' text = 'Effective' value = '2' lineColor = "#ff00" / >
< ReferenceLine index '2' = visible = "true" lineWidth = "2" text = "Need improvement" value = "1" lineColor = "#ff00" / > < / Y1ReferenceLine >
< Y1Axis axisMinAutoScaled = "false" axisMinValue = "0.0" axisMaxAutoScaled = "false" axisMaxValue = "3.0" majorTickStepAutomatic = "false" majorTickStep = "0.2" / >
< LocalGridData colCount = rowCount "{count (xdoxslt:group(.//PLXSVGRAPH, ' COMPETENCY/COMPETENCY_NAME'))}" = "5" >
< RowLabels >
Employee of < label > < / Label >
Manager < label > < / Label >
peer < label > < / Label >
Matrix Manager < label > < / Label >
Direct reports < label > < / Label >
< / RowLabels >
< ColLabels >
< xsl: for each groupe-select=".//PLXSVGRAPH ' group by ' SKILL/COMPETENCY_NAME' = > '.
< xsl: sort select = "COMPÉTENCE/COMPETENCY_NAME" / >
< label > < xsl: value-of select = "current-group () / COMPETENCE/COMPETENCY_NAME" / > < / Label >
< / xsl: for each group->
< / ColLabels >
< DataValues >
< RowData >
< xsl: for each groupe-select=".//PLXSVGRAPH ' group by ' SKILL/COMPETENCY_NAME' = > '.
< xsl: sort select = "COMPÉTENCE/COMPETENCY_NAME" / >
< cell >
< xsl: value - of select = "sum (current - group () / COMPETENCY/EMPLOYEE)" / >
< / cell >
< / xsl: for each group->
< / RowData >
< RowData >
< xsl: for each groupe-select=".//PLXSVGRAPH ' group by ' SKILL/COMPETENCY_NAME' = > '.
< xsl: sort select = "COMPÉTENCE/COMPETENCY_NAME" / >
< cell >
< xsl: value - of select = "sum (current - group () / COMPETENCY/MANAGER)" / >
< / cell >
< / xsl: for each group->
< / RowData >
< RowData >
< xsl: for each groupe-select=".//PLXSVGRAPH ' group by ' SKILL/COMPETENCY_NAME' = > '.
< xsl: sort select = "COMPÉTENCE/COMPETENCY_NAME" / >
< cell >
< xsl: value - of select = "sum (current - group () / COMPETENCY/PEER)" / >
< / cell >
< / xsl: for each group->
< / RowData >
< RowData >
< xsl: for each groupe-select=".//PLXSVGRAPH ' group by ' SKILL/COMPETENCY_NAME' = > '.
< xsl: sort select = "COMPÉTENCE/COMPETENCY_NAME" / >
< cell >
< xsl: value - of select = "sum (current - group () / COMPETENCY/DIRECT_REPORT)" / >
< / cell >
< / xsl: for each group->
< / RowData >
< RowData >
< xsl: for each groupe-select=".//PLXSVGRAPH ' group by ' SKILL/COMPETENCY_NAME' = > '.
< xsl: sort select = "COMPÉTENCE/COMPETENCY_NAME" / >
< cell >
< xsl: value - of select = "sum (current - group () / COMPETENCY/MATRIX_MANAGER)" / >
< / cell >
< / xsl: for each group->
< / RowData >
< / DataValues >
< / LocalGridData >
< / chart >
I get the following error and do not know what he tells me. Any thoughts?
Real fonts: C:\Program Files\Oracle\XML editor Desktop\Template Builder for Word\fonts
Run Start OPE
SetLocale RTFProcessor: en - us
FOProcessor setData: C:\Documents and Settings\steven.hart\Desktop\XML Publisher\PLEXUS_MRF.xml
SetLocale FOProcessor: en - us
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)
at java.lang.reflect.Method.invoke (unknown Source)
at oracle.apps.xdo.common.xml.XSLT10gR1.invokeProcessXSL(XSLT10gR1.java:586)
at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:383)
at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:201)
at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:161)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1015)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:968)
at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:209)
at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1561)
at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:951)
at RTF2PDF.runRTFto (RTF2PDF.java:626)
at RTF2PDF.runXDO (RTF2PDF.java:460)
at RTF2PDF.main (RTF2PDF.java:251)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at oracle.xdo.parser.v2.XSLForEachGroup.processGroups(XSLForEachGroup.java:462)
at oracle.xdo.parser.v2.XSLForEachGroup.process01(XSLForEachGroup.java:282)
at oracle.xdo.parser.v2.XSLForEachGroup.process(XSLForEachGroup.java:210)
at oracle.xdo.parser.v2.XSLForEachGroup.processAction(XSLForEachGroup.java:94)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLVariable.getValue(XSLVariable.java:223)
at oracle.xdo.parser.v2.XSLVariable.processAction(XSLVariable.java:117)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180)
at oracle.xdo.parser.v2.XSLNode.processChildren(XSLNode.java:417)
at oracle.xdo.parser.v2.XSLTemplate.processAction(XSLTemplate.java:191)
at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:508)
at oracle.xdo.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:485)
at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:264)
at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:150)
at oracle.xdo.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:187)
... 16 moreIts so difficult to understand your condition, you do not give any description.
But from the xml, I guessed that that's what you were trying to get.
Let me know if it helps
It worked for me :)
chart:
-
I work with XML in AS3. I'm loading in an xml with dates in a format such as:
2011-1-12-10-00-a
I am to convert those to the actual Date of Flash in order to compare them and use the methods of the class Date, etc. I prefer convert once and then store them in the XML node, they came.
Is it possible to store complex values such as date or what you have in an XML?
Yes, or more directly using:
var ms:int=date.getTime();
var newDate:Date = new Date (ms);
-
Dynamically set height chart flash?
Hello
I have a flash chart which includes a selector that changes the query for the chart. Depending on what the user selects, the chart displays a different number of lines (is be a stacked horizontal bar graph, but this could be apply to any type of chart). I would like to be able to dynamically set the graphic height based on the number of rows that the query returns. If I put it is too small and that the user makes a choice that refers to a larger number of lines, the bars in the chart are compressed to the point where the labels are illegible or omitted altogether. Conversely, if I set the height to a higher value and the user makes a selection which results in a small number of lines, the list is too long and difficult to read.
I'm able to calculate what I would like the height of the chart to be using a page element and one before the process of the header. But I can't understand how to pass this value to AnyChart. I tried to use an article of substitution (e.g., & P7_CHART_HEIGHT) as the value for the graph height on the graphic settings of attributes/Chart page, but this attribute requires a numeric value other than zero. I tried to understand if I could change the XML graph, but could not understand how do and I don't know substitutions is passed in the XML in any case.
Is there a way to dynamically set the height attribute of a chart at page load time?
Thank you
Mike
-
I'm working through a tutorial where the XML format looks like:
< image CBC =" images/1N.jpg " name =" example 1 " />
The AS3 code that goes with it is:
imageText.text = xml.image[slideNum].@name.toString ();
imageText.text being the dynamic text field. This code works very well, but I do not work with this particular format. My XML code looks more like:
< imgTitle>Kalamazoo< /imgTitle>< imgURL > images/1n.jpg < / imgURL >The previous AS3 code does not work with it. @imgTitle.toString () does not appear. The Flash will trace the XML file for me, so I know it's reading, but it will not fill in my dynamic text field.All thoughtsShe already returns a string, and '@' is used for attributes. All you need is the following:
myXML.imgTitle
-
Eception java.lang.error trying to create format XML string
I am trying to create XML documents without having to build everything manually whenever I want to do this. I created a XMLFile class to create the document. When I try to launch my app TestFoo, I get untrapped Exception java.lang.error. I tried kxml2, using org.w3c.dom, java XML, banging my head against the wall as to why it will not work until I finally just rolled my own simple implementation. I always get the error! No details are provided. There is no stack trace. I use the emulator 9000 "BOLD" crossing os 4.6.0 eclipse 3.4.1
Console:
Starting TestFooStarted TestFoo(154)Exit TestFoo(154)ErrorNo detail messageTestFoo Document
0x171TestFoo XMLFile 0x381TestFoo TestFoo 0x297TestFoo TestFoo main 0x276 TestFoo.java
import net.rim.device.api.system.Application; public class TestFoo extends Application { public static void main(String[] args) { TestFoo foo = new TestFoo(); foo.enterEventDispatcher(); } public TestFoo() { XMLFile xml = new XMLFile("rootNode"); xml.addProperty("myprop", "some value"); System.out.println(xml.toFormattedXMLString()); System.exit(0); }}
XMLFile.java
public class XMLFile { Document document; public XMLFile(String rootElement) { document = new Document(rootElement); } public void addProperty(String pName, String pText) { Element elm = new Element("property"); elm.addAttribute("name", pName); elm.setTextContent(pText); document.appendChild(elm); } public String toFormattedXMLString() { return document.toFormattedXML(); }}
Element.Java
import java.util.Enumeration;import java.util.Hashtable;import java.util.Vector; public class Element { private Vector children; private String name; private String textContent; private Hashtable attributes; public Element(String name) { this.children = new Vector(); this.attributes = new Hashtable(); this.name = name; } public void appendChild(Element child) { this.children.addElement(child); } public Vector getChildren() { return children; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getTextContent() { return textContent; } public void setTextContent(String textContent) { this.textContent = textContent; } public Hashtable getAttributes() { return attributes; } public boolean hasChildren() { return (this.children.size() > 0); } public int childrenCount() { return this.children.size(); } public String getAttributeValue(String name) { return this.attributes.get(name).toString(); } public void addAttribute(String key, String value) { this.attributes.put(key, value); } public void addAttribute(String key, int value) { addAttribute(key,Integer.toString(value)); } public void addAttribute(String key, long value) { addAttribute(key,Long.toString(value)); } public void addAttribute(String key, boolean value) { addAttribute(key, String.valueOf(value)); } public boolean hasAttribute(String name) { return this.attributes.containsKey(name); } public Element getChild(int position) { return (Element) this.children.elementAt(position); } public Enumeration getAttributeKeys() { return this.attributes.keys(); }}
Document.Java
import java.util.Enumeration; public class Document { private static final char _gt = '>'; private static final char _lt = '<'; private static final char _eq = '='; private static final char _dqt = '"'; private static final char _cl = '/'; private static final char _sp = ' '; private static final char _tab = '\t'; private static final byte[] _nl = System.getProperty("line.separator").getBytes(); private Element rootNode; private StringBuffer sb; public Document(String rootName) { this.rootNode = new Element(rootName); } public void appendChild(Element child) { this.rootNode.appendChild(child); } public String toFormattedXML() { sb = new StringBuffer(); format(this.rootNode,0); return sb.toString(); } private void format(Element node, int depth) { writeOpenTag(node, depth); for (int i=0;i
0;i--) { sb.append(_tab); } } private void writeOpenTag(Element node, int depth) { indent(depth); sb.append(_lt); sb.append(node.getName()); for (Enumeration keys = node.getAttributeKeys();keys.hasMoreElements();) { String key = keys.nextElement().toString(); sb.append(_sp).append(key); sb.append(_eq).append(_dqt); sb.append(node.getAttributeValue(key).toString()); sb.append(_dqt); } } private void writeCloseTag(Element node, int depth) { if (node.hasChildren()) { sb.append(_lt).append(node.getName()); } else { sb.append(_cl); } sb.append(_gt).append(_nl); }} This line:
private static final byte[] _nl = System.getProperty("line.separator").getBytes();
is originally a NullPointerException because line.separator is not well supported. The line terminator standard for XML is CR/LF, so you can use:
private static final byte[] _nl = { '\r', '\n' };
-
XSL file to format XML Document
Hey programmers,.
This thread is referring to this one (http://supportforums.blackberry.com/t5/Java-Development/Reading-XML-document/m-p/512637) which was resolved yesterday.
A little history: I ripped with success of XML from a server in response to a post message, I was able to put it inside a document using InputStream and was able to read the text content of this XML on the Blackberry screen.
Now I would use a .xsl file to format the XML document and then display it on the screen as HTML. Is this possible? How would I go to do this?
I found this piece of code on the internet (java, not specific to the blackberry associated):
public class CreationHTML {}
public static void createHTML (xml, xsl string string, string html) bird Exception {}
Create the source of DOM
DocumentBuilderFactory FabriqueD = DocumentBuilderFactory.newInstance ();
DocumentBuilder builder = fabriqueD.newDocumentBuilder ();
File fileXml = new File (xml);
Document document = builder.parse (fileXml);
Source source = new DOMSource (text);Creation of the output file
File fileHtml = new File (html);
Result result = new StreamResult (fileHtml);Configuration of the transformer
FabriqueT TransformerFactory = TransformerFactory.newInstance ();
StreamSource stylesource = new StreamSource (xsl);
Transformer transformer = fabriqueT.newTransformer (stylesource);
transformer.setOutputProperty (OutputKeys.METHOD, "html");
Transformation
transform. Transform (source, result);
}
Public Shared Sub main (String [] args) {}
try {}
createHTML ("Annuaire.xml", "Annuaire.xsl", "Annuaire.html");
} catch (Exception e) {e.printStackTrace () ;}
}
}But actually I have a .xsl, not a string file, do you think that I could adapt it to meet my needs?
Many thanks for any help!
If you implement TransformerFactory on blackberry: sure, no problem.
In the opposite case: rather not.
-
How to export the Indesign to Format XML using JavaScript document
Hi all...
Can someone help me, how to export the indesign document to XML Format using JavaScript...
Thanks in advance...
doc.exportFile ( ExportFormat.XML, File(Folder.desktop+"/doc.xml" )
Maybe you are looking for
-
I have several email accounts and recently changed my ISP. I want to continue to have access to the old email addresses, but would like to have the new ISP address appear at the top of the address list. Is it possible to move the address up or down i
-
How can I find my favorites on an old hard drive?
I bought a new computer and installed Firefox. Firefox has also been installed on my old computer, and I have the old hard drive connected to my new computer as drive E. I would get my favorites copied from the old drive to my current profile on my n
-
New RAM not working not not on iMac 2010
Hello I have a 21.5 ' mid year 2010 i3 iMac, and, after all this time, it was time to upgrade the RAM. I bought 2 x 4 GB Patriot SODIMM PC3 - 10600 1333 MHz 204-pin, by following the instructions in the Web page of Apple memory upgrade (install memor
-
Satellite A100: High grade noise / problem solved using RMClock 2.25
Here are the screenshots of how I calibrated RMClock to solve this problem on my Satellite A100 with processor T7200.http://img99.imageshack.us/img99/408/rm1pa2.jpghttp://img99.imageshack.us/img99/2816/rm2ik6.jpghttp://img99.imageshack.us/img99/3485/
-
I am running Windows Vista and my PC won't start in safe mode. I tried all sorts of things, including the restore points, antivirus, etc. I'm trying to get, for once, go to normal mode, so I can transfer files on an external hard drive, so I can up