People
I need to add some
charts to my application. I can see Orbeon supports jfreechart but the
information is a little vague. Is this still a current module? If
so, is there any examples and how can I call the processor?
Cheers
Steven
-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Steven,
Yes, the chart processors still work and we are using them on some projects. However the documentation is somewhat outdated. I'll see what I can do to migrate it to the wiki, and add some more useful information. Alex On Wed, Nov 17, 2010 at 8:08 PM, Steven Kerr <[hidden email]> wrote: > People > > I need to add some charts to my application. I can see Orbeon supports > jfreechart but the information is a little vague. Is this still a current > module? If so, is there any examples and how can I call the processor? > > Cheers > > Steven > > -- > You receive this message as a subscriber of the [hidden email] mailing > list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Alex
Thanks for that. You are a champion!! Kind regards Steven -----Original Message----- From: Alessandro Vernet [mailto:[hidden email]] Sent: Tuesday, 23 November 2010 14:00 To: [hidden email] Subject: [ops-users] Re: Charts Steven, Yes, the chart processors still work and we are using them on some projects. However the documentation is somewhat outdated. I'll see what I can do to migrate it to the wiki, and add some more useful information. Alex On Wed, Nov 17, 2010 at 8:08 PM, Steven Kerr <[hidden email]> wrote: > People > > I need to add some charts to my application. I can see Orbeon > supports jfreechart but the information is a little vague. Is this > still a current module? If so, is there any examples and how can I call the processor? > > Cheers > > Steven > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Steven,
Wait until I have more documentation and an example ready for you before saying that! ;) Alex On Mon, Nov 22, 2010 at 11:44 PM, Steven Kerr <[hidden email]> wrote: > Alex > > Thanks for that. You are a champion!! > > Kind regards > > Steven > > -----Original Message----- > From: Alessandro Vernet [mailto:[hidden email]] > Sent: Tuesday, 23 November 2010 14:00 > To: [hidden email] > Subject: [ops-users] Re: Charts > > Steven, > > Yes, the chart processors still work and we are using them on some projects. However the documentation is somewhat outdated. I'll see what I can do to migrate it to the wiki, and add some more useful information. > > Alex > > On Wed, Nov 17, 2010 at 8:08 PM, Steven Kerr <[hidden email]> wrote: >> People >> >> I need to add some charts to my application. I can see Orbeon >> supports jfreechart but the information is a little vague. Is this >> still a current module? If so, is there any examples and how can I call the processor? >> >> Cheers >> >> Steven >> >> -- >> You receive this message as a subscriber of the [hidden email] >> mailing list. >> To unsubscribe: mailto:[hidden email] >> For general help: mailto:[hidden email]?subject=help >> OW2 mailing lists service home page: http://www.ow2.org/wws >> >> > > > > -- > Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet > > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Administrator
|
In reply to this post by Alessandro Vernet
Hi Steven,
This is an old thread, but this example is now included in the documentation, and we now also have some background information on how the chart processor is typically used. Thanks again Steven! http://wiki.orbeon.com/forms/doc/developer-guide/processors-charts-and-spreadsheets#TOC-Using-the-processor Alex On Sun, Dec 5, 2010 at 6:48 PM, Steven Kerr <[hidden email]> wrote: > Alex > > Thanks for that!! I now have an example working which should be all I need to get going!!!! I have included it (and some of your comments) as this will probably help others. > > Note: I am using a nightly build from around June 2010 (working fine). > > > 1) Create file (generate-chart.xpl) in an app directory: > > <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:exist="http://exist.sourceforge.net/NS/exist" > xmlns:oxf="http://www.orbeon.com/oxf/processors"> > > <p:param name="data" type="output"/> > > <p:processor name="oxf:chart"> > <p:input name="config"><config/></p:input> > <p:input name="data" > > <data> > <x-axis> > <value>1</value> > <value>2</value> > <value>3</value> > <value>4</value> > <value>5</value> > </x-axis> > <y-axis> > <value>1</value> > <value>3</value> > <value>5</value> > <value>3</value> > <value>6</value> > </y-axis> > </data> > </p:input> > <p:input name="chart" > > <chart> > <type>vertical-bar</type> > <title>vertical-bar Example</title> > <category-title>X-axis title</category-title> > <serie-title>Y-axis title</serie-title> > <value title="test" categories="data/x-axis/value" series="data/y-axis/value"/> > <x-size>400</x-size> > <y-size>400</y-size> > <background-color>#FFFFFF</background-color> > <title-color>#000000</title-color> > </chart> > </p:input> > <p:output name="data" ref="data"/> > </p:processor> > > </p:config> > > > 2) Add a line to your page flow (edit this to match local path names): > <page path-info="/generate-chart" view="/generate-chart.xpl"/> > > > 3) Point your browser directly at service (inc app path if nessary): > ...../orbeon/generate-chart > > 4) Copy the filename you should see (e.g jfreechart-384648364673836346.png) > > 5) point your browser at the generated chart (e.g.): > ....../orbeon/chartDisplay?filename=jfreechart-384648364673836346.png > (you should now see the chart) > > 6) > Now that you have this working, change the service to except the data as input. you can call the service with a submission replace instance. You then have the filename in an instance and can refer toit from an AVT: > <xhtml:img src="/orbeon/chartDisplay?filename={instance('chart')/file}"/> > This goes to the JFreeChart servlet (it is defined in the web.xml by default), which serves the file previously generated. > > > > Thanks again Alex > > Cheers > > Steven > > > -----Original Message----- > From: Alessandro Vernet [mailto:[hidden email]] > Sent: Saturday, 4 December 2010 13:37 > To: Steven Kerr > Subject: Re: [ops-users] Re: Charts > > Hi Steven, > > There are a few way to use the chart processors, as in fact there are > 3 processors covering different use cases. But let's give it a shot > with one of them: oxf:chart. In a nutshell: > > 1. You create a service that does the chart generation. So in the page > flow, you could have: > > <page path-info="/generate-chart" view="/generate-chart.xpl"/> > > And in the XPL file: > > <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:exist="http://exist.sourceforge.net/NS/exist" > xmlns:oxf="http://www.orbeon.com/oxf/processors"> > > <p:param name="instance" type="input"/> > <p:param name="data" type="output"/> > > ... > > <p:processor name="oxf:chart"> > <p:input name="config"><config/></p:input> > <p:input name="data" href="#data"/> > <p:input name="chart" href="#chart"/> > <p:output name="data" ref="data"/> > </p:processor> > > </p:config> > > The "data" input can be any XML, it is referenced by XPath from the > document in the "chart" input, which has to follow the format > described on http://www.orbeon.com/orbeon/doc/processors-charts-spreadsheets. > When the service is called, it creates the image for the chart on > disk, and returns a file name in an XML document <file>...</file>. > > 2. From XForms, you can call that service with a submission replace > instance. You then have the filename in an instance and can refer to > it from an AVT: > > <xhtml:img src="/orbeon/chartDisplay?filename={instance('chart')/file}"/> > > This goes to the JFreeChart servlet (it is defined in the web.xml by > default), which serves the file previously generated. > > You'll let me know how this works. > > Alex > > On Thu, Dec 2, 2010 at 6:45 PM, Steven Kerr > <[hidden email]> wrote: >> Alex >> >> In the meantime, could you please tell me how to call the processor? >> >> Cheers >> >> Steven >> >> >> -----Original Message----- >> From: Alessandro Vernet [mailto:[hidden email]] >> Sent: Tuesday, 23 November 2010 14:00 >> To: [hidden email] >> Subject: [ops-users] Re: Charts >> >> Steven, >> >> Yes, the chart processors still work and we are using them on some projects. However the documentation is somewhat outdated. I'll see what I can do to migrate it to the wiki, and add some more useful information. >> >> Alex >> >> On Wed, Nov 17, 2010 at 8:08 PM, Steven Kerr <[hidden email]> wrote: >>> People >>> >>> I need to add some charts to my application. I can see Orbeon >>> supports jfreechart but the information is a little vague. Is this >>> still a current module? If so, is there any examples and how can I call the processor? >>> >>> Cheers >>> >>> Steven >>> >>> -- >>> You receive this message as a subscriber of the [hidden email] >>> mailing list. >>> To unsubscribe: mailto:[hidden email] >>> For general help: mailto:[hidden email]?subject=help >>> OW2 mailing lists service home page: http://www.ow2.org/wws >>> >>> >> >> >> >> -- >> Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet >> >> > > > > -- > Orbeon Forms - Web forms, open-source, for the Enterprise - > http://www.orbeon.com/ > My Twitter: http://twitter.com/avernet > > -- Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |