Difference between revisions of "DPL Example 101"

From FollowTheScore
Jump to: navigation, search
(New page: {{Example|Define a pie chart manually}} <pre><nowiki> {{#dpl: |category=Fictitious country |include={Country}:capital:name |table=,,Capital,Name }} </nowiki></pre> ---- The above scri...)
 
 
Line 2: Line 2:
  
 
<pre><nowiki>
 
<pre><nowiki>
{{#dpl:
+
{{#ploticus:
  |category=Fictitious country
+
 
  |include={Country}:capital:name
+
#proc getdata
|table=,,Capital,Name
+
  data:
 +
"Alpha" 100
 +
"Beta" 200
 +
"Gamma" 300
 +
 
 +
// render pie graph
 +
#proc pie
 +
datafield: 2
 +
labelfmtstring: @@1\n@@2\n@@PCT%
 +
labelmode: line+label
 +
outlinedetails: color=blue
 +
center: 3 3
 +
radius: 1.1
 +
colors: dullyellow drabgreen pink powderblue lavender
 +
labelfarout: 1.2
 +
explode: 0 0.2 0 0
 
}}
 
}}
 
</nowiki></pre>
 
</nowiki></pre>
  
 
----
 
----
The above scriot produces the following output:
+
The above script produces the following output:
 
----
 
----
 
{{#ploticus:
 
{{#ploticus:
Line 31: Line 46:
 
labelfarout: 1.2
 
labelfarout: 1.2
 
explode: 0 0.2 0 0
 
explode: 0 0.2 0 0
 
 
}}
 
}}

Latest revision as of 10:03, 13 March 2009

back to list of examples

Define a pie chart manually

{{#ploticus:

#proc getdata
  data:
"Alpha" 100
"Beta"  200
"Gamma" 300

//  render pie graph
#proc pie
datafield: 2
labelfmtstring: @@1\n@@2\n@@PCT%
labelmode: line+label
outlinedetails: color=blue
center: 3 3
radius: 1.1
colors: dullyellow drabgreen pink powderblue lavender
labelfarout: 1.2
explode: 0 0.2 0 0
}}

The above script produces the following output:


{{#ploticus:

  1. proc getdata
 data:

"Alpha" 100 "Beta" 200 "Gamma" 300

// render pie graph

  1. proc pie

datafield: 2 labelfmtstring: @@1\n@@2\n@@PCT% labelmode: line+label outlinedetails: color=blue center: 3 3 radius: 1.1 colors: dullyellow drabgreen pink powderblue lavender labelfarout: 1.2 explode: 0 0.2 0 0 }}