How to make several charts

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to make several charts

youssef.taieb
As a beginner I would like to modify the example which uses the charts to have an exit containing several charts different. But I don't know how to make it.Must I modify the xforms or the pipeline ?
example default-submission.xml :

<form>
    <action/>
    <data>
        <entries>
            <entry>
                <category>Apples</category>
                <value1>10</value1>
                <value2>11</value2>
            </entry>
            <entry>
                <category>Oranges</category>
                <value1>9</value1>
                <value2>8</value2>
            </entry>
            <entry>
                <category>Bananas</category>
                <value1>8</value1>
                <value2>6</value2>
            </entry>
            <entry>
                <category>Berries</category>
                <value1>7</value1>
                <value2>10</value2>
            </entry>
            <entry>
                <category>Pears</category>
                <value1>6</value1>
                <value2>4</value2>
            </entry>
        </entries>
    </data>
      <chart>
        <map>fruits</map>
        <background-color>#EFF6EF</background-color>
        <title-color>#281154</title-color>
        <type>line</type>
        <title>Sales in Unit</title>
        <category-title>Fruits</category-title>
        <category-margin>0.2</category-margin>
        <serie-title>Units</serie-title>
        <tick-unit>1.0</tick-unit>
        <bar-margin>0.1</bar-margin>
        <category-label-angle>0</category-label-angle>

        <value title="May"
            categories="/form/data/entries/entry/category"
            series="/form/data/entries/entry/value1"
            color="#ff0000"/>

        <value title="June"
            categories="/form/data/entries/entry/category"
            series="/form/data/entries/entry/value2"
            color="#00ff00"/>

        <legend visible="true" position="south"/>

        <x-size>455</x-size>
        <y-size>350</y-size>
      </chart>
    <chart>
        <map>fruits2</map>
        <background-color>#EFF6EF</background-color>
        <title-color>#281154</title-color>
        <type>pie-3d</type>
        <title>Sales in Unit</title>
        <category-title>Fruits</category-title>
        <category-margin>0.2</category-margin>
        <serie-title>Units</serie-title>
        <tick-unit>1.0</tick-unit>
        <bar-margin>0.1</bar-margin>
        <category-label-angle>0</category-label-angle>

        <value title="May"
            categories="/form/data/entries/entry/category"
            series="/form/data/entries/entry/value1"
            color="#ff0000"/>

        <value title="June"
            categories="/form/data/entries/entry/category"
            series="/form/data/entries/entry/value2"
            color="#00ff00"/>

        <legend visible="true" position="south"/>

        <x-size>300</x-size>
        <y-size>175</y-size>
      </chart>

</form>

here I used the same data for the charts, but it can be other data for several charts.

I hope you can understand what I want, because I know I haven't a good English speaking .



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: How to make several charts

Alessandro  Vernet
Administrator
Hi Youssef,

To generate multiple charts, you would have to run the oxf:chart
processor multiple times in your XPL, aggregate the output, pass that
aggregated output to the view, and from there use XForms or XSLT to
generate an <xhtml:img src="...">. Does this help?

Alex

On 1/9/07, [hidden email] <[hidden email]> wrote:

> As a beginner I would like to modify the example which uses the charts to have an exit containing several charts different. But I don't know how to make it.Must I modify the xforms or the pipeline ?
> example default-submission.xml :
>
> <form>
>     <action/>
>     <data>
>         <entries>
>             <entry>
>                 <category>Apples</category>
>                 <value1>10</value1>
>                 <value2>11</value2>
>             </entry>
>             <entry>
>                 <category>Oranges</category>
>                 <value1>9</value1>
>                 <value2>8</value2>
>             </entry>
>             <entry>
>                 <category>Bananas</category>
>                 <value1>8</value1>
>                 <value2>6</value2>
>             </entry>
>             <entry>
>                 <category>Berries</category>
>                 <value1>7</value1>
>                 <value2>10</value2>
>             </entry>
>             <entry>
>                 <category>Pears</category>
>                 <value1>6</value1>
>                 <value2>4</value2>
>             </entry>
>         </entries>
>     </data>
>       <chart>
>         <map>fruits</map>
>         <background-color>#EFF6EF</background-color>
>         <title-color>#281154</title-color>
>         <type>line</type>
>         <title>Sales in Unit</title>
>         <category-title>Fruits</category-title>
>         <category-margin>0.2</category-margin>
>         <serie-title>Units</serie-title>
>         <tick-unit>1.0</tick-unit>
>         <bar-margin>0.1</bar-margin>
>         <category-label-angle>0</category-label-angle>
>
>         <value title="May"
>             categories="/form/data/entries/entry/category"
>             series="/form/data/entries/entry/value1"
>             color="#ff0000"/>
>
>         <value title="June"
>             categories="/form/data/entries/entry/category"
>             series="/form/data/entries/entry/value2"
>             color="#00ff00"/>
>
>         <legend visible="true" position="south"/>
>
>         <x-size>455</x-size>
>         <y-size>350</y-size>
>       </chart>
>     <chart>
>         <map>fruits2</map>
>         <background-color>#EFF6EF</background-color>
>         <title-color>#281154</title-color>
>         <type>pie-3d</type>
>         <title>Sales in Unit</title>
>         <category-title>Fruits</category-title>
>         <category-margin>0.2</category-margin>
>         <serie-title>Units</serie-title>
>         <tick-unit>1.0</tick-unit>
>         <bar-margin>0.1</bar-margin>
>         <category-label-angle>0</category-label-angle>
>
>         <value title="May"
>             categories="/form/data/entries/entry/category"
>             series="/form/data/entries/entry/value1"
>             color="#ff0000"/>
>
>         <value title="June"
>             categories="/form/data/entries/entry/category"
>             series="/form/data/entries/entry/value2"
>             color="#00ff00"/>
>
>         <legend visible="true" position="south"/>
>
>         <x-size>300</x-size>
>         <y-size>175</y-size>
>       </chart>
>
> </form>
>
> here I used the same data for the charts, but it can be other data for several charts.
>
> I hope you can understand what I want, because I know I haven't a good English speaking .
>
>
>
>
> --
> 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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>

--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet