Graphing information in JADE

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Graphing information in JADE

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:05 pm

by pillick >> Sun, 20 Jan 2002 21:18:48 GMT

Hey

I need to be able to create simple bar charts and line graphs and wotnot... How can I insert graphs into my forms? I cant see any support for this within JADE, do I need to import an activeX control to do it?

I tried importing MS Graph Control, but painter crashed everytime I tried to use it. Does anyone have any other suggestions?

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Graphing information in JADE

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:05 pm

by ConcrdDev >> Tue, 22 Jan 2002 20:37:23 GMT

Hi,

I used an ActiveX from www@quinn-curtis.com. I think it cost around $200 to $300 (Don't quote me - I'm guessing.. and I did recover this cost from the client. It was easy to install and works very well. And once purchased, it is royalty free for you to distribute with your product.

Happy hunting...

Peter

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Graphing information in JADE

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:05 pm

by pillick >> Tue, 22 Jan 2002 23:14:07 GMT

Thanks, I see there is a demo of it so i'll try that out. My project is more of a research project at the moment, so my client probably wouldnt spring for another software package... =/

I only need the basics, so if anyone out there knows of a bare-bones freeware package, could you point me to it?

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Graphing information in JADE

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:05 pm

by pillick >> Wed, 23 Jan 2002 0:56:09 GMT

woops, I seem to be repeating myself - sorry. umm, I've downloaded the demo ConcrdDev, but I have no idea how to use it - it didnt include a hlp file or anything, and there isnt much help on the website. Do u have a help file you could send me?

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Graphing information in JADE

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:05 pm

by ConcrdDev >> Wed, 23 Jan 2002 4:19:48 GMT

Its seems so long ago that I did this code - and I can't find the
help on it
and I'm not sure if I used any help to get it going anyway, which is
a
problem, as my client wants some changes done soon !!!

I thought I would copy you the two methods that I use to create two graphs.
The first is a line graph, plotting three sets of values, and the
second is
a histogram, plotting averages over a number of data samples, by
using this
code and replacing my references to data with your own references you
get it
to work.

Peter Gallagher
Concord Systems Ltd

p.s. Sorry about how the methods look below - I hope they cut/paste better
into your Jade App - Good Luck


The first one
reateRollMeanGraph( pJm : JobMaster) updating;
// --------------------------------------------------------------
// Created : 02 November 2000
// By : Peter
// Desc :
//
// --------------------------------------------------------------

vars
str : String;
n0,n1,n2 : Integer;
cht : CTWXChart;
idx,idx2 : Integer;
jme : JobMasterExtra;
min : Decimal[23,6];
max : Decimal[23,6];
med : Decimal[23,6];
mean : Decimal[23,6];
jm : JobMaster;
isMin,isMax : Boolean;
set : CPJMExtraSet;
jdetails : JobMasterExtra;
rollCount : Integer;
sampleCount : Integer;begin


// jme := myJMExtra;
jm := pJm;
cht := cTRollBars; // Set the form control to a local variable- makes
it easier to work with (not a trick)

create set transient;
createJMExtraSetData(jm,set);

min := jm.getMin;
max := jm.getMax;
mean := jm.calculateMean(rollCount , sampleCount);
// write jm.getMicron.dp0;
tbTarget.text := jm.getMicron.dp0;
tbRollCount.text := rollCount.String;
tbSampleCount.text := sampleCount.String;
tbTolerances.text := min.dp0 & ' - '&max.dp0;
tbMean.text := mean.dp1;


cht.setTitleString(0,'Roll Mean');
cht.setTitleFontSize(0,12);
cht.setTitleString(1,'');
cht.setTitleString(2,'Number of rolls sampled');
cht.setTitleFontSize(2,10);
cht.setTitleFontStyle(0,1);

cTRollBars.visible := true;

if min > 0 then
isMin := true;
endif;
if max > 0 then
isMax := true;
endif;

if isMin then
// setup the second data set
cht.setSDataEnable(1,true);
cht.setSDataType(1,0); // SIMPLE_XY_DATA_TYPE
cht.setSPlotType(1,0); // ST_LINEPLOT
cht.setSPlotLineColor(1,Green);
cht.setSDataNumPlotPoints(1,set.size +1);
endif;

if isMax then
// setup the third data set
cht.setSDataEnable(2,true);
cht.setSDataType(2,0); // SIMPLE_XY_DATA_TYPE
cht.setSPlotType(2,0); // ST_LINEPLOT
cht.setSPlotLineColor(2,Green);
cht.setSDataNumPlotPoints(2,set.size +1);
endif;

// setup the Fourth data set (median)
cht.setSDataEnable(3,true);
cht.setSDataType(3,0); // SIMPLE_XY_DATA_TYPE
cht.setSPlotType(3,0); // ST_LINEPLOT
cht.setSPlotLineColor(3,Red);
cht.setSDataNumPlotPoints(3,set.size +1);

cht.setSPlotType(0,0); // ST_LinePlot (0,1) bar plot
cht.setSPlotBarColor(0,Yellow);

cht.setAxisAutoAxis(1,true);
cht.setAxisTitleString(1,'Average Micron');
cht.setAxisLabelFontSize(1,8);
cht.setAxisTitleFontSize(1,10);
cht.setAxisMax(0,set.size +1 );
cht.rightPlotArea := 0.8;
file://write cht.rightPlotArea;
cht.setSDataNumPlotPoints(0,set.size +1);
file://write cht.getSDataNumPlotPoints(0);

idx := 0;
idx2 := 1;
foreach jme in set do
med := jme.CPJMExtra.calculateMean();
if med <> 0 then
cht.setXDataValues(0,0,idx);
cht.setYDataValues(0,0,0,med);
cht.setYDataValues(1,0,0,max);
cht.setXDataValues(0,idx2,idx2);
cht.setYDataValues(0,idx2,0,med);
cht.setYDataValues(1,idx2,0,max);

idx2 := idx2 + 1;
endif;
endforeach;

while idx < set.size +1 do

if isMin then
// min values
cht.setXDataValues(1,idx,idx);
cht.setYDataValues(1,idx,0,min);
endif;

if isMax then
// min values
cht.setXDataValues(2,idx,idx);
cht.setYDataValues(2,idx,0,max);
endif;

cht.setXDataValues(3,idx,idx);
cht.setYDataValues(3,idx,0,mean);


idx := idx +1;
endwhile;

cht.updateGraph;

end;

Second...

createJobHistogram( pJm : JobMaster) updating;
// --------------------------------------------------------------
// Created : 02 November 2000
// By : Peter
// Desc :
//
// --------------------------------------------------------------

vars
str : String;
n0,n1,n2 : Integer;
cht : CTWXChart;
idx,idx2 : Integer;
jme : JobMasterExtra;
min : Decimal[23,6];
max : Decimal[23,6];
med : Decimal[23,6];
mean : Decimal[23,6];
jm : JobMaster;
isMin,isMax : Boolean;
set : CPJMExtraSet;
jdetails : JobMasterExtra;
rollCount : Integer;
sampleCount : Integer;
da : DecimalArray;
startValue : Integer;
endValue : Integer;
plotCount : Integer;
gotStart : Boolean;
gotEnd : Boolean;
maxFrequency: Integer;begin


// jme := myJMExtra;
jm := pJm;
cht := cTJobRollHist; // change the control on the for to a
local
variable

da := jm.calcFrequency();
// work out the size of the graph
idx := 1;
while idx < 300 do
if da[idx] <> 0 then
if gotStart then
endValue := idx;
else
gotStart := true;
startValue := idx;
endValue := idx;
endif;
endif;
idx := idx + 1;
endwhile;
plotCount := endValue - startValue + 1;
// work out max Frequency
idx := startValue;
while idx < endValue do
if da[idx] > maxFrequency then
maxFrequency := da[idx].Integer;
endif;
idx := idx + 1;
endwhile;
cht.setTitleString(0,'Histogram');
cht.setTitleFontSize(0,12);
cht.setTitleString(1,'');
cht.setTitleString(2,'');
cht.setTitleFontSize(2,10);
cht.setTitleFontStyle(0,1);

cht.visible := true;

// this is the chart setup
cht.setSPlotType(0,1); // ST_BarPlot (0,1) bar plot
cht.setSPlotBarColor(0,Blue);
// cht.setAxisAutoAxis(1,true);
cht.setAxisMin(0,startValue - 1); // 0 = x axis
cht.setAxisMax(0,endValue + 1);
cht.setAxisMin(1,0); // 1 = y axis
cht.setAxisMax(1, maxFrequency);

cht.setAxisTitleString(1,'Frequency');
cht.setAxisLabelFontSize(1,8);
cht.setAxisTitleFontSize(1,10);

// cht.setAxisMax(0,plotCount +1 );
cht.rightPlotArea := 0.8;
// write cht.rightPlotArea;
cht.setSDataNumPlotPoints(0,endValue +1);
// write cht.getSDataNumPlotPoints(0);


// write 'PlotCount='&plotCount.String&Tab&'startValue='&startValue.String&Tab &'endVa
lue='&endValue.String;
idx := startValue;
idx2 := 1;
while idx < endValue do
med := da[idx];
cht.setXDataValues(0,idx,idx+1);
cht.setYDataValues(0,idx,0,med);

idx := idx + 1;

endwhile;

cht.updateGraph;
end;

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Graphing information in JADE

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:05 pm

by ConcrdDev >> Thu, 24 Jan 2002 3:44:21 GMT

Apparently I can't email you as you have logged onto this via the Web (or something - so I'm told)

I have now found the help file for the Charting software - so if you reply letting me know your email address I can send you the HLP file

Peter

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Graphing information in JADE

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:05 pm

by pillick >> Tue, 29 Jan 2002 20:57:35 GMT

Its dnk2@waikato.ac.nz. Thanks heaps for all the help.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Graphing information in JADE

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:05 pm

by pillick >> Tue, 22 Jan 2002 23:17:13 GMT

Thanks, I see there is a demo of it so i'll try that out. My project is more of a research project at the moment, so my client probably wouldnt spring for another software package... =/

I only need the basics, so if anyone out there knows of a bare-bones freeware package, could you point me to it?


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 36 guests

cron