Cheers Tudor,
I poorly explained. I want to ask you an idea : how to represent the data
and code on Glamour Seaside?
I give you an example:
Normally, i create a method like this on Pharo image:
plot: aSymbol
(data at: 1) size > 1
| diag f Ylabel |
f := [ :x | (self atIndex: x) at: 1 ].
Ylabel := 'Number of Individuals of ',aSymbol asString.
diag := ESDiagramRenderer new.
diag lineDiagram
y: f;
defaultColor: Color blue;
yAxisLabel: Ylabel;
regularAxis;
startLineAtZero;
width: 1000;
height: 500;
models: index.
^ diag open
In order to represent this diagram on Glamour(Pharo image) and on the
web(Seaside localhost),
i create a browser and transmit data:
browser transmit
from: #graph1;
to: #visual;
andShow: [ :a |
a eyesee
title: 'Visualisation';
display: [:data | data ];
diagram: [:renderer :data |
renderer lineDiagram
y: [ :x | (data atIndex: x) at: 1 ];
models: data index;
width: 900;
height: 250;
yAxisLabel: 'Number of individuals';
regularAxis;
valueAxis;
defaultColor: Color red
]
].
^ browser
But it is difficult to represent a composite diagram(the part in bold), i
donn't find any solution to represent data.
i code this diagram:
plotVector: aSymbol
| cqdiag f Ylabel nbSpecies listColor diagRenderer |
cqdiag := ESCompositeDiagram new. <------composite
diagram
*nbSpecies := (data at: 1) size.* <-----get data
*listColor := self initializeListColors.*
Ylabel := 'Number of Individuals of ',aSymbol asString.
*1 to: nbSpecies do:[:i|* <---------a loop
|diag|
f := [ :x | (self atIndex: x) at: i ].
diag := (ESDiagramRenderer new lineDiagram)
y: f;
defaultColor: (listColor at: i);
yAxisLabel: Ylabel;
regularAxis;
startLineAtZero;
models: index.
cqdiag add: diag.
].
cqdiag width: 1200.
cqdiag height: 500.
cqdiag preferredAxisMaxY: (self preferredDataMax).
diagRenderer := ESDiagramRenderer new.
diagRenderer diagram: cqdiag.
^ diagRenderer open
Now, i want to rewrite this code using a browser and runs it on localhost
Seaside. You know a example of composite diagram or how to represent this
diagram ?
Best regards.
Thanks avance.
ttnhoa
--
View this message in context:
http://forum.world.st/EyeSee-show-composite-diagram-on-Glamour-Seaside-tp46…
Sent from the Moose mailing list archive at
Nabble.com.