I would like to show Database Fields as Barcharts (widget)

like this:
http://web2py.appspot.com/t3/default/wiki/charts

or better
http://t.wits.sg/jquery-progress-bar/

It should be possible to show more then one barchart per Page, which
can be updated by a Callback (I want to use them in a Grid)

I´ve tried the ProgressBar from Client Tools for web2py, but its not
possible to show more then one per Page.

Thats my first approach:

response.files.append(URL(r=request,c='static/jquery-
autocomplete',f='jquery.progressbar'))
def barchart():
    get_value= URL(r=request,f="get_percent")
    wrapper = DIV()
    script_1 = SCRIPT("jQuery('#bar').progressBar('%s');" %
(get_percent),_type="text/javascript")
    wrapper.components.extend([script_1])
    return wrapper

db.define_table('task',
    Field('name', 'string'),
    Field('percent', 'integer', widget=barchart))


But this is work in progress...

Is there any widget in web2py, to show a value as Barchart/Progressbar
or any other already implemented Solution?

THX

Dieter Asman

Reply via email to