|
How can I use ChartMaker? You
can use chartMaker either as a utility by slecting options, or you
can start using the stack in your own work and send it
commands.
Requires MetaCard v2.5 or later or Revolution v2.1
or later.
ChartMaker is free for personal, non-profit and
non-commercial use. To license ChartMaker functions or implement
customized features, please write to admin@FlexibleLearning.com for
a 15k plugin. See conditions of use below.
1. As a
Utility Follow steps 1-3. ChartMaker will place your chart in
a new group on the current topStack of your work. You need a
toplevel stack or you will get an error. A new chart is created for
each new Title. An existing title is simply
replaced.
2. By sending commands To use
ChartMaker as part of your own work, put chartMaker.rev in the same
folder as your copy of MetaCard or Revolution, place the following
in your own stack script...
on
openStack start
using stack "chartMaker" end openStack
then
use the syntax shown next. Click 'Show script...' to see how this
works. Some examples are also given at the bottom of this
page.
Syntax get CMbarChart (<Title>
<ValueList> <LabelList> <LabelType> <isLegend>
<Orientation> <isColor> <is3D> <DataLoc>
<Size> <isOpaque> <isBorder> <FontFace>
<FontSize>)
get CMpieChart (<Title>
<ValueList> <LabelList> <LabelType> <isLegend>
<isColor> <Size> <isOpaque> <isBorder>
<FontFace> <FontSize>)
Parameters All parameters may be omitted
except ValueList and LabelList.
Title: Name of
chart
ValueList: Chart values (either comma- or
return-separated list)
LabelList: Chart labels
(either comma- or return-separated
list)
LabelType: "Label",
"Values","Both","None"
Orientation: "V(ertical)"
for vertical, "H(orizontal)" for
horizontal
isLegend: "show(Legend)" or "hide(Legend)"
isColor: "c(olor)" for colorised chart,
"bw" for pattern only
is3D: "3D" for
3D effect, "p(lain)" for plain
effect
DataLoc: "ext(ernal)" to show data outside,
"int(ernal)" to show data
inside
Size: "small", "large", or
"max" for card size. Pie charts: Small is 200x200, medium is
300x300. Bar charts: Small is 300x200, medium is
400x300.
isOpaque: "T(ransparent)" or
"O(paque)"
isBorder: "show(Border)" or
"hide(border)"
FontFace: Any font available to
your system
FontSize: Any size available to the
font face
Examples Create a button in your stack and
try any of these one-liners (remember to 'start using stack
chartMaker')...
on mouseUp start
using stack chartMaker get CMbarChart
("MyChart1","6,8,3","Mac,Win,Linux","Label","showLegend","vert","color","3D","external",
"small","Opaque","showBorder","MS
Serif","13") if it is not empty
then answer error
it end if end mouseUp
Other examples...
get CMbarChart
("MyChart2","6"&cr&"8"&cr&"3","Mac"&cr&"Win"&cr&"Linux","Data","showLegend","V","C",
"plain","ext","small","O","show","MS Sans Serif","13")
get
CMbarChart
("MyChart3","6,8,3","Mac"&cr&"Win"&cr&"Linux","none","hideLegend","H","bw","3D","int",
"max","Trans","hide","Times","12")
get CMpieChart
("MyChart4","6,8,3","Mac"&cr&"Win"&cr&"Linux","Label","show","c","max",
"opaque","showBorder","Arial","12")
get CMpieChart
("MyChart5","6"&cr&"8"&cr&"3","Mac,Win,Linux","Data","hide","color","small",
"Transparent","hideBorder","Comic Sans MS","12")
get
CMpieChart
("MyChart6","6,8,3","Mac,Win,Linux","both","showLegend","bw","large","Trans","show",
"Times","10")
Errors
The following errors are
returned... ERROR: Not
supported ERROR: Number of values and labels must be
the same ERROR: Values must be
numeric ERROR: No data ERROR: Negative
values ERROR: Can't modify stack
<stackName> ERROR: No destination stack
available
3. TIPS
Moving your chart.. After you have created
your chart, the following is built in... Use
left-click to drag the chart. Use right-click (or
control-click) to drag Pie Chart labels.
Important A mouseDown handler is placed in
the group script so you can move your chart. You may need to include
a blocking handler in your card script...
on
mouseDown end mouseDown
Font Options... These standards work quite
well: Arial, 12 Arial Narrow,
12 Comic Sans MS, 12 MS Serif,
13 MS Sans Serif, 13 Times,
10 Times, 12 Verdana,
10
CONDITIONS OF USE By using chartMaker you
are agreeing to the following:
1. You use this utility or
incorporate its functionality entirely at your own risk. No
warranty, claims of fitness of purpose or accuracy either express or
implied is either offered or given, and you assume full
responsibility for using it.
2. You may use the utility or
incorporate its functionality in any private, non-commercial or
non-profitmaking work for no charge.
3. You may not sell it,
bundle it, or include it in or with any other product desgined to be
enhanced by its inclusion without the express prior consent of The
Flexible Learning Company and without imposing the same conditions
of use, including this condition, on subsequent
users.
chartMaker is copyright The Flexible Learning
Company, ©2000-2004
|