Difference between revisions of "CreateDiagram"
Line 77: | Line 77: | ||
''//Result: Public/GetImage.aspx?tempfile=Chart/Test_Create_Diagram.png'' | ''//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:// | + | {{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://[sitename].catglobe.com/Public/GetImage.aspx?tempfile=Chart/Test_Create_Diagram.png"). |
'''Availability''' | '''Availability''' |
Latest revision as of 08:31, 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: "http://[sitename].catglobe.com/Public/GetImage.aspx?tempfile=Chart/Test_Create_Diagram.png").
Availability
All