dbTalk Databases Forums  

Some questions on xmCHART

comp.databases.filemaker comp.databases.filemaker


Discuss Some questions on xmCHART in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Diego B
 
Posts: n/a

Default Some questions on xmCHART - 03-24-2007 , 02:19 PM






Hi everybody,

I started using this plug-in to create some charts on my database. The
aim was to create real time charts (bar, pie and line charts) for the
single record (single patient, it is a clinical database) and also
summary charts (data from all the patients).
I have to say that, although I use Filemaker since a couple of years,
I am not an expert and my knowledge on scripting is really limited.
Sayd that, I created some global fields (gFunctions gChart, gData and
gFunctionsWithPlacehoplders) and organized them in scripts, as
explained in the tutorial. I had some good results, but I am pretty
far from my target. So I have some questions:

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.

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 ?

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 ?

I know these are silly questions but I am struggling with the scripts
since two days and I need some help to keep going.

Thank you in advance

Diego


Reply With Quote
  #2  
Old   
Peter
 
Posts: n/a

Default Re: Some questions on xmCHART - 03-26-2007 , 04:59 AM






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


Reply With Quote
  #3  
Old   
Diego B
 
Posts: n/a

Default Re: Some questions on xmCHART - 03-26-2007 , 10:24 PM



On Mar 26, 4:59 am, Peter <nom... (AT) homeorwork (DOT) tnx> wrote:
Quote:
Hi Diego,
-----------Mega Cut !---------------

Quote:
Best regards,

Peter
First of all, thank you so much for the clear and complete reply !

1) I fixed the problem, thanks a lot !

2) The idea is interesting and I will test it ASAP, I will let you
know if it works

3) I fixed also this, the trick was to get rid of the loop (obvious
when you knew that : )



Reply With Quote
  #4  
Old   
Peter
 
Posts: n/a

Default Re: Some questions on xmCHART - 03-28-2007 , 01:14 AM



Quote:
First of all, thank you so much for the clear and complete reply !
glad I could help, let me know if you need more assistance.

Best regards,

Peter


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.