Sorry for my stupidity :(
Ive tried your code, and as said before, the svg is being generated
ok, but it is not displayed on the browser (attached an image of the
page). When i right click on the broken image icon, and press save as,
i can download the svg.
For what i was reading, i dont think it is possible to include a svg
image in a <img> tag, i think only <embed> <object> and <iframe> can
have an svg image.
Anyway, i will keep looking for a solution.
Thanks!
On Mon, Jun 30, 2008 at 5:36 PM, Manuel Corrales
<[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:
I am going to try your code as soon as i can, but i still don't
understand where are you generating the svg image on this code.
On Mon, Jun 30, 2008 at 1:59 PM, Nino Saturnino Martinez Vazquez
Wael <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:
hmm whats JFreeChart image?
I usually do this, in my domain classes :
JFreeChart chart = ChartFactory
.createTimeSeriesChart(
Messages.getString("ReportWeightChart.5", locale),
Messages.getString("ReportWeightChart.6", locale),
Messages.getString("ReportWeightChart.7", locale), dataset,
true, true, false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
return chart.createBufferedImage(500, 270);
And this in the wicket page :
Report simpleReport = (Report)
item.getModelObject();
BufferedImage report =
simpleReport.getReport(getLocale());
ImageResource imageResource = new
ImageResource(report);
item.add(new Image("image", imageResource));
Ahh, I see you are mixing things(found the JFreeChart on the
wiki).. You cant do it like that it should be like
this(although the otherway can also be done):
JFreeChart chart = ChartFactory.createPieChart("Resumen de
gastos",
dataSet, true, true, false);
PiePlot plot = (PiePlot) chart.getPlot();
plot.setSectionOutlinesVisible(false);
add(new Image("image",chart.createBufferedImage(640,
480)));
Manuel Corrales wrote:
Here is the page code: (this is all prototype code, just
messing around with
graphics on wicket)
JFreeChart chart = ChartFactory.createPieChart("Resumen de
gastos",
dataSet, true, true, false);
PiePlot plot = (PiePlot) chart.getPlot();
plot.setSectionOutlinesVisible(false);
add(new Image("image",new JFreeChartImage("image",
chart, 640,
480)));
Thanks a lot!!
On Mon, Jun 30, 2008 at 11:36 AM, Nino Saturnino Martinez
Vazquez Wael <
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
wrote:
Manuel Corrales wrote:
Yes, i know, but i have tried with firefox and
opera. Also to implement
the
<object> solution i have to write the image to the
disc first and then
dynamically set the data attribute on the object tag.
Nino: what do you mean by where is the page? If i
can see a non SVG image
with exactly the same page, shouldn't i be able to
see an SVG image?
I just wanted to see how you implemented it in the
page... Both java and
html (just to double check)... And I saw the part
about some browsers not
handling svg very good.
Best regards.
On Mon, Jun 30, 2008 at 9:24 AM, Federico Fanton
<[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:
On Sun, 29 Jun 2008 21:03:29 -0300
"Manuel Corrales" <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
Hey, great!! But still having issues,
sorry to bother you again. Now i
added
the svg to the page, but the browser do
not display it. The image is
there,
because when i right click the broken
image that is displayed by the
broser
and press save as, i can save the svg and
is good. Should my html tag be
different, or should i set something else
on my code:
Not every browser handles SVGs directly, some
need a plugin (guess which
one :) ).. In our project I use the <object
.../> tag, so for example
when
the page is rendered it has a
<object style="height: 32px; width: 32px;"
data="images/logo.svg"/>
Bye!
---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
--
-Wicket for love
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684
---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
--
-Wicket for love
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]