Hi,

I use that trick too for simple bar graphs. Maybe it breaks every HTML law on the book - but it works!

(and it's a lot easier to maintain than a separate server-side graphing library). Again, you could use Velocimacros to make this simpler for the web designer.

It all depends on the intended audience. Many apps with graphs are intended for specific audiences (e.g. you can safely ignore readers with text browsers), or for internal audiences (who might be standardized on a browser). But for a simple bar graph I think it would work fine for most browsers.

WILL

----- Original Message ----- From: "Ryan Lea" <[EMAIL PROTECTED]>
To: "Velocity Users List" <velocity-user@jakarta.apache.org>
Sent: Wednesday, February 16, 2005 4:57 AM
Subject: RE: graphs using velocity



The would pretty much break every HTML law in the book ... Well the W3C standards way of doing things, which pretty much specify that tables should be used for tabular data and tabular data only. Screen readers would have a horrendous time, let alone trying to get the graph to display the same in a number of different browsers.

As far as getting the web 'standardized' promoting the use of tables to
display graphs takes a very large step back.

Go for the image way and optimize it as much as possible with GIF/JPG or
better yet PNG ... If size becomes a problem ....

-----Original Message-----
From: Dr Daniel Graham [mailto:[EMAIL PROTECTED]
Sent: 16 February 2005 12:44 PM
To: Velocity Users List
Subject: Re: graphs using velocity


IF you just need a little graph .. say a simple bar chart or line graph,

you can use
a table, and stretch a 1 pixel gif to your desired width ...

<td width="90%"><img src=/imgs/blue1p.gif border=1 WIDTH=163 HEIGHT=12
</td>
<td width="90%"><img src=/imgs/blue1p.gif border=1 WIDTH=120 HEIGHT=12
</td>


and so on.

If you want a line graph, place a 1 pixed gif stretched before it then
draw a single line ..

you can do lot's of things like that with tables .. it's a bit heavy on
HTML but not as much as a JPEG and so on .. and you'll usually only do
it for a limited number of columns.

HTH

DG



Will Glass-Husain wrote:

Hi Prasad,

This probably won't help you, as these are are custom VelocityMacros
we include in our system. (an online simulation engine called Forio
Broadcast). The source is not available, but the macros are fairly
simple.  (they just translate names of variables into a img tag with a

long URL).  Really, they're just a convenience.

Still, if you're interested you can read our documentation.  "Revenue"
and "Costs" are simulation variables specific to our particular system

(basically, they are a series of double values arrayed over time).

http://www.forio.com/broadcastdocs/creating_interfaces/how_to_create_gra
phs.htm


For more info on Velocity macros, read the Velocity docs.
http://jakarta.apache.org/velocity/user-guide.html#Velocimacros

For more info on how to create your own graph servlet, you'll have to
read the docs of the third-party graphing library you end up choosing.

WILL




----- Original Message ----- From: "prasad neo" <[EMAIL PROTECTED]> To: "Velocity Users List" <velocity-user@jakarta.apache.org> Sent: Monday, February 14, 2005 11:44 PM Subject: Re: graphs using velocity



how to build these varibles revenue and Costs. what is its datatype. Is there any documentation for these macros if it is then please send me links.



--- Will Glass-Husain <[EMAIL PROTECTED]> wrote:

PS.  One nice way Velocity can help with graphs is
through macros.  If you
end up with a long complicated <img> url to generate
a graph, abstract this
with a macro.  Our Velocity-based system has a
number of graph related
macros.

http://www.forio.com/broadcastdocs/creating_interfaces/how_to_create_
graphs.htm



For example, in our system the macro #LineGraph (["Revenue", "Costs"] 400 300)

generates the text

<img

src="graph?FD_rand=1861&FD_graph=1&VariableName=Revenue&VariableName=
Costs&Width=400&Height=300"



width="400" height="300">

which instructs our custom-written graph servlet to generate a graph

of the variables revenue and costs over time (in a GIF
image sized 400x300).

Best,
WILL

----- Original Message ----- From: "prasad neo"
<[EMAIL PROTECTED]>
To: "Velocity Users List"
<velocity-user@jakarta.apache.org>
Sent: Monday, February 14, 2005 11:15 PM
Subject: Re: graphs using velocity


> thanks Will Glass-Husain. > I will try jfree tool. > ok bye > > > > --- Will Glass-Husain <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I have a Velocity based web application that >> includes graphs. I don't use >> velocity to generate graphs, I use a third party graphing app. >> My web page includes a img tag with a special URL which displays >> a JPEG or GIF graph. >> >> There's a couple of different libraries that can generate the >> graphs. You might try JFreeChart if you're looking for a free >> library. Personally, I >> really like the commercial but inexpensive package >> KavaCharts (includes both >> server and client side components). There's also a >> number of much more >> expensive server-side tools. >> >> WILL >> >> ----- Original Message ----- >> From: "prasad neo" <[EMAIL PROTECTED]> >> To: "Velocity Users List" <velocity-user@jakarta.apache.org>; >> "Shinobu Kawai" <[EMAIL PROTECTED]> >> Sent: Monday, February 14, 2005 10:53 PM >> Subject: graphs using velocity >> >> >> > Hii all >> > Can anybody tell me way to generate graphs >> > using velocity. >> > In my project i need to generate all types >> of >> > graphs using my database I am using Turbine >> framework >> > and torque for database and velocity as template >> > engine. >> > >> > so please help me >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > --- Shinobu Kawai <[EMAIL PROTECTED]> wrote: >> >> Hi Nathan, >> >> >> >> > > > no, i don't think it's documented anywhere. >> >> any good idea for where >> >> > > > such a note should go? >> >> > > >> >> > > I would definitely want one in the VVS >> javadoc >> >> and/or view tool top >> >> > > page. >> >> > >> >> > wanna make a patch? :) >> >> >> >> I'll file a bugzilla issue for you. ;) >> >> ## I'll make the patch if I have some extra time. >> >> >> >> > >Would it be comfortable in the Velocity >> developer >> >> guide? >> >> > >> >> > i dunno, but certainly not unless/until the VVS >> >> makes it in there too. >> >> >> >> Figured you would say that. :) >> >> >> >> Best regards, >> >> -- Shinobu >> >> >> >> -- >> >> Shinobu Kawai <[EMAIL PROTECTED]> >> >> >> >> >> > >> >

---------------------------------------------------------------------

>> >> To unsubscribe, e-mail:
>> >> [EMAIL PROTECTED]
>> >> For additional commands, e-mail:
>> >> [EMAIL PROTECTED]
>> >>
>> >>
>> >
>> >
>>
>

_____________________________________________________________________
___

>> > Yahoo! India Matrimony: Find your life partner
>> online
>> > Go to: http://yahoo.shaadi.com/india-matrimony
>> >
>> >
>>
>

---------------------------------------------------------------------

>> > To unsubscribe, e-mail:
>> [EMAIL PROTECTED]
>> > For additional commands, e-mail:
>> [EMAIL PROTECTED]
>> >
>>
>>
>>
>

---------------------------------------------------------------------

>> To unsubscribe, e-mail:
>> [EMAIL PROTECTED]
>> For additional commands, e-mail:
>> [EMAIL PROTECTED]
>>
>>
>
>

_____________________________________________________________________
___

> Yahoo! India Matrimony: Find your life partner
online
> Go to: http://yahoo.shaadi.com/india-matrimony
>
>

---------------------------------------------------------------------

> To unsubscribe, e-mail:
[EMAIL PROTECTED]
> For additional commands, e-mail:
[EMAIL PROTECTED]
>



---------------------------------------------------------------------

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]




________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: 14/02/2005


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs service.

________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs service.
________________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to