More actions
Cg huyphong (talk | contribs) No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{HelpFiles}} | |||
====createDiagram==== | ==== createDiagram ==== | ||
From input structure creates an image. | From input structure creates an image. | ||
'''Syntax''' | '''Syntax''' | ||
createDiagram(''diagramSpecification, imageName'') | createDiagram(''diagramSpecification, imageName'') | ||
'''Arguments''' | '''Arguments''' | ||
''diagramSpecification:'' Is a string expression. | ''diagramSpecification:'' Is a string expression. | ||
''imageName:'' Is a string expression. | ''imageName:'' Is a string expression. | ||
'''Return type''' | '''Return type''' | ||
empty | empty | ||
'''Examples''' | '''Examples''' | ||
'' | ''number alone = 120; '' | ||
'' | ''number married = 29;'' | ||
'' | ''number haveBoyfriend = 72;'' | ||
'' | ''number haveGirlfriend = 36;'' | ||
'' | ''number separated = 59;'' | ||
'' | ''number widow = 12;'' | ||
'' | ''string diagramSpecification1 = '' | ||
'' "< | ''"<?xml version=\"1.0\" encoding=\"utf-8\" ?>"+'' | ||
'' "< | ''"<diagram>"+'' | ||
'' "< | ''"<chart chart-type=\"chart-diagram\" stylesheetid=\"559\">"+'' | ||
'' "< | ''"<title>Marital Status</title>"+'' | ||
'' "< | ''"<axis-label>I'm alone</axis-label>"+'' | ||
'' "< | ''"<axis-label>I'm married</axis-label>"+'' | ||
'' "< | ''"<axis-label>I have a boyfriend who I live with</axis-label>"+'' | ||
'' "< | ''"<axis-label>I have a girlfriend that I do not live with</axis-label>"+'' | ||
'' "< | ''"<axis-label>I have separated or divorced</axis-label>"+'' | ||
'' "< | ''"<axis-label>I am a widow/widower</axis-label>"+'' | ||
'' | ''"<series series-legend=\"Marital Status\" series-type=\"bar\">"+'' | ||
'' | ''"<item>"+alone+"</item>"+'' | ||
'' | ''"<item>"+married+"</item>"+'' | ||
All | ''"<item>"+haveBoyfriend+"</item>"+'' | ||
__NOTOC__ | |||
<!-- imported from file: 657.htm--> | ''"<item>"+haveGirlfriend+"</item>"+'' | ||
''"<item>"+separated+"</item>"+'' | |||
''"<item>"+widow+"</item>"+'' | |||
''"</series>"+"</chart>"+"</diagram>";'' | |||
''string diagramName= "Test_Create_Diagram.png";'' | |||
''createDiagram(diagramSpecification1, diagramName); '' | |||
''//Result: Public/GetImage.aspx?tempfile=Chart/Test_Create_Diagram.png'' | |||
{{note}}You have to change style sheet Id to style sheet Id on your working site and add your site name before image path (e.g: http://abc.catglobe.com/Public/GetImage.aspx?tempfile=Chart/Test_Create_Diagram.png) | |||
'''Availability''' | |||
All __NOTOC__ <!-- imported from file: 657.htm--> | |||
[[Category:Diagram/report_generating_CGScript_functions]] |
Revision as of 07:27, 28 December 2011
createDiagram
From input structure creates an image.
Syntax
createDiagram(diagramSpecification, imageName)
Arguments
diagramSpecification: Is a string expression.
imageName: Is a string expression.
Return type
empty
Examples
number alone = 120;
number married = 29;
number haveBoyfriend = 72;
number haveGirlfriend = 36;
number separated = 59;
number widow = 12;
string diagramSpecification1 =
"<?xml version=\"1.0\" encoding=\"utf-8\" ?>"+
"<diagram>"+
"<chart chart-type=\"chart-diagram\" stylesheetid=\"559\">"+
"<title>Marital Status</title>"+
"<axis-label>I'm alone</axis-label>"+
"<axis-label>I'm married</axis-label>"+
"<axis-label>I have a boyfriend who I live with</axis-label>"+
"<axis-label>I have a girlfriend that I do not live with</axis-label>"+
"<axis-label>I have separated or divorced</axis-label>"+
"<axis-label>I am a widow/widower</axis-label>"+
"<series series-legend=\"Marital Status\" series-type=\"bar\">"+
"<item>"+alone+"</item>"+
"<item>"+married+"</item>"+
"<item>"+haveBoyfriend+"</item>"+
"<item>"+haveGirlfriend+"</item>"+
"<item>"+separated+"</item>"+
"<item>"+widow+"</item>"+
"</series>"+"</chart>"+"</diagram>";
string diagramName= "Test_Create_Diagram.png";
createDiagram(diagramSpecification1, diagramName);
//Result: Public/GetImage.aspx?tempfile=Chart/Test_Create_Diagram.png
Note: You have to change style sheet Id to style sheet Id on your working site and add your site name before image path (e.g: )
Availability
All