This is my syntax for the page I was using to test out the charting:

{{html clean="true"}}
<div class="graphs">
<img src="
http://10.100.229.50:8080/xwiki/bin/download/SD/QueryPage/testgraph.png";
alt="graph"
title="SOME GRAPH"
height="300"
width="400"/>
</div>
{{/html}}

{{chart type="line" source="inline" params="range:B2-C6;series:columns;"
title="Chart Test" width="320" height="240"}}
|  |X  |Y  |Z
|Q1|1.2|3.4|1.3
|Q2|4.5|3.4|2.3
|Q3|1.2|4.5|9.0
|Q4|3.4|1.2|1.2
|Q5|1.5|2.0|
{{/chart}}

{{chart type="bar"
params="document:SD.Data;table:table1;range:B2-D5;series:columns;"
title="Chart Two" width="320" height="240"/}}

{{velocity}}
{{chart source="inline" type="bar" params="range:B2-B7;series:columns;"
title="Square"}}
| |Square
  #foreach($i in [1..6])
|${i}|$mathtool.pow($i, 2)
#end
{{/chart}}
{{/velocity}}

I was trying all sorts of different charting methods to see if it was simply
how I was writing the macro or maybe something obscure I was missing. The
very top one was just to test and see if my browser couldnt display the
image, so I attached a .png but that displayed fine across all browsers so I
knew that it was something chart or server related.

All that the charts would display as was a html link which led to an empty
page. The charts were showing up in the 'charts' directory in our Tomcat
server, I could see them when I opened them server side, but for some reason
they just couldn'd be displayed on the xwiki page.

Hope this helps?


> > Well the charting macro that I tried to get working was this:
> >
> > {{chart type="line" source="inline" params="range:B2-D5;series:columns;"
> > title="Chart Test" width="320" height="240"}}
> > |  |X  |Y  |Z
> > |Q1|1.2|3.4|1.3
> > |Q2|4.5|3.4|2.3
> > |Q3|1.2|4.5|9.0
> > |Q4|3.4|1.2|1.2
> > {{/chart}}
>
> This example works very well for me in XE 3.2 SNAPSHOT (I'm sure it works
> well in older versions too - Don't know about 2.6 though).
>
> Is that all you have in your content? Could you give us your full content
> so that we can try to reproduce it?
>
> > Which I had believed to be XWiki syntax 2.0?
>
> Yes it's 2.0 syntax.
>
> > I took the example from
> > http://extensions.xwiki.org/xwiki/bin/view/Extension/Chart+Macro so
> unless
> > there
> > is newer syntax for charting that I am unaware of.. That is what I was
> using
> > and it now works that I have changed the rendering order.
>
> And if you change back the rendering order to what it was initially, does
> it still work?
>
> Thanks
> -Vincent
>
> > I am running Enterprise 2.6.33065 with Tomcat 7.0.14 if that makes any
> > difference.
> >
> > Adam
> >
> > On Tue, Jul 12, 2011 at 8:33 AM, Vincent Massol <vinc...@massol.net>
> wrote:
> >
> >> Hi Adam,
> >>
> >> On Jul 11, 2011, at 10:34 PM, Adam Kozuch wrote:
> >>
> >>> **Just wanted to let anyone know who was having the same issue, it was
> >>> caused by the order that things are rendered on a wiki page.
> >>>
> >>> The fix (at least temporarily) was to go into the xwiki.cfg file and
> edit
> >>> the line containing the order which files are rendered.
> >>>
> >>> I changed the line :
> >>>
> >>> # xwiki.render.renderingorder=macromapping, groovy, velocity, plugin,
> >> wiki,
> >>> wikiwiki
> >>>
> >>> to this :
> >>>
> >>> # xwiki.render.renderingorder=groovy, velocity, macromapping, plugin,
> >> wiki,
> >>> wikiwiki
> >>>
> >>> And now it works. I'm assuming its because the page tried to post the
> >> chart
> >>> before it was rendered.
> >>
> >> Hmmm that's really strange since the {{chart}} macro is XWiki 2.0 syntax
> >> while the param you mentioned it for XWiki Syntax 1.0.
> >>
> >> Are you sure it's this param change that made it work for you?
> >>
> >> If so, could you create a jira issue about this on
> http://jira.xwiki.org?
> >>
> >> Thanks a lot
> >> -Vincent
> >>
> >>>
> >>> My charts work, all is well.
> >>>
> >>> Adam
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
>
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to