Hi Diego,
Quote:
1) The tutorial reports the importance that chart and container filed
(gChart) dimensions be very similar...how can I see the dimensions of
the container field ? I was able to fit the chart in the filed only
trying, but I do not think it is the best approach. |
If you're in Layout mode, choose "Object size" from the View menu. This
will open a small window showing the size of each object (or group of
objects) that is currently selected. Use this to set the correct size for
your container field. If you click on the units on the right side of the
size window, you can alternate between mm., inches and pixels.
Quote:
2) The tutorial says that is possible to create a calculation field
instead of a text filed (gFunctions) so that I could avoid scripting
and the charts would update automatically as changing the numbers in
the database. It is not completely clear to me how could I do that.
What is the field to transform and what should that transformed in ? |
The way to draw the graph is to call the external function xmCH_DrawChart()
with a text string which contains the actual parameters of the graph (size,
type, data etc.). The tutorial provides an example where, using a script,
you first set a field gFunctions to contain this text string and then
subsequently call the function with gFunctions as its argument.
What I think the tutorials points at with the calculation field (but I
haven't tried it myself) is that you define a calculation field, with a
container as a result, which calls the xmCH_DrawChart() function with the
required text string and chart data. Let's assume a number field "Data",
which contains your chart data, and the calculation field MakeChart, result
container, :
xmCH_DrawChart(
"OpenDrawing(x;y)¶
OpenChart(0;0;x;y;off)¶
ChartData ("
& Data & ")¶"
&
"
LineChart()¶
CloseDrawing()
"
)
Check "Do not evaluate if all referenced fields are empty" and replace x
and y with your dimensions. If you put the field MakeChart on a layout, it
should show you the graph, which should update as soon as Data changes.
This gives you a dynamic graph which changes along with the data in stead
of a scripted graph, which you need to update manually.
Quote:
3) Following some examples I was able to create a bar chart plotting
all the data about one variable stored in the database, I mean a
summary of all the records (I used I loop). How could I reach the same
result but for one record only ? |
Depends on what type of data you have in the field. If it contains only a
single number it wouldn't make much sense to put it in a graph.
Best regards,
Peter