You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by James <ja...@gmail.com> on 2010/09/30 07:55:12 UTC

JFreeChart with clickable imagemap

Hi Guys,

I followed the instructions in the wiki "JFreeChart with clickable
imagemap<https://cwiki.apache.org/WICKET/jfreechart-with-clickable-imagemap.html>"
to create a chart.
I have a requirement whereby the chart has to be generated dynamically based
on certain inputs.
I managed to create the chart image by using LoadableDetachableModel but
struggling to get the imagemap updated as the chart image changes.
Kindly give your valuable suggestions.

-- 
Thanks & Regards,
James

Re: JFreeChart with clickable imagemap

Posted by Iain Reddick <ia...@beatsystems.com>.
  Doesn't that code render the chart twice, with the rendering for the 
image map simply being dumped?

On 04/10/2010 07:51, Peter Karich wrote:
> thanks!
>
>> Dear all,
>>
>> I've added a new wiki page "JFreeChart with tooltip
>> example<https://cwiki.apache.org/confluence/display/WICKET/JFreeChart+with+tooltip+example>",
>> which outlines the steps to follow to create JFreeChart based charts that
>> can display tooltips.
>>
>> On Fri, Oct 1, 2010 at 3:05 PM, James<ja...@gmail.com>  wrote:
>>
>>
>>> Thanks Ernesto.
>>> I'll do the same.
>>>
>>>
>>> On Fri, Oct 1, 2010 at 2:24 PM, Ernesto Reinaldo Barreiro<
>>> reiern70@gmail.com>  wrote:
>>>
>>>
>>>> James,
>>>>
>>>> why not add this "bit" to the wiki page you mentioned? So that others
>>>> can avoid loosing the hours you lost;-)
>>>>
>>>> Cheers,
>>>>
>>>> Ernesto
>>>>
>>>> On Fri, Oct 1, 2010 at 8:18 AM, James<ja...@gmail.com>  wrote:
>>>>
>>>>> Guys,
>>>>>
>>>>> Finally managed to display the tooltip generated by JFreeChart in the
>>>>>
>>>> wicket
>>>>
>>>>> page by following these
>>>>> instructions<
>>>>>
>>>> http://markmail.org/message/r36cvdt2o3c4pki6#query:wicket%20jfreechart%20tooltips+page:1+mid:xqpnjdsj2lnkoinq+state:results
>>>>
>>>>> .
>>>>> Had only an example markup been given in that post, it would have saved
>>>>>
>>>> lots
>>>>
>>>>> of frustrating hours I spent. :-(
>>>>>
>>>>> For anyone looking forward for showing the tooltips in a chart generated
>>>>>
>>>> by
>>>>
>>>>> JFreeChart, here is the markup you might need.
>>>>>
>>>>> <code>
>>>>>     <img wicket:id="chart" usemap="#tooltip"></img>
>>>>> </code>
>>>>>
>>>>> For the java part, use this
>>>>> code<
>>>>>
>>>> http://markmail.org/message/r36cvdt2o3c4pki6#query:wicket%20jfreechart%20tooltips+page:1+mid:xqpnjdsj2lnkoinq+state:results
>>>>
>>>>> .
>>>>>
>>>>> Your output should look something like this..
>>>>>
>>>>> <code>
>>>>>        <img wicket:id="chart" usemap="#tooltip" src="blah blah"></img>
>>>>>        <map id="tooltip" name="tooltip">
>>>>>             <area/>
>>>>>        </map>
>>>>> </code>
>>>>>
>>>>>
>>>>> NOTE:
>>>>>
>>>>>   - You must use<code>  <img wicket:id="chart" usemap="#tooltip"></img>
>>>>> </code>  and not<code>  <img wicket:id="chart" usemap="#tooltip"/>
>>>>>
>>>> </code>
>>>>
>>>>>   - You must use the "#" symbol before the "usemap" id.
>>>>>   - The image map related html markup is generated by the api provided by
>>>>> JFreeChart.
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Oct 1, 2010 at 10:34 AM, James<ja...@gmail.com>
>>>>>
>>>> wrote:
>>>>
>>>>>
>>>>>> Hi Peter,
>>>>>>
>>>>>> Thanks for your prompt reply.
>>>>>> I don't know how I missed this wonderful mailing list for this long..
>>>>>>
>>>> ;-(
>>>>
>>>>>> I have tried passing models to constructImageMap (wrapping the chart
>>>>>>
>>>> image
>>>>
>>>>>> object as a model) but somehow the map was not updated.
>>>>>>
>>>>>> I checked jetwick and it looks cool. ;-)
>>>>>> Do you use JFreeChart to create those charts?
>>>>>> I'm willing to try that option as well. Kindly blog about it!
>>>>>>
>>>>>> Thanks once again for taking your time to reply.
>>>>>>
>>>>>>
>>>>>> On Thu, Sep 30, 2010 at 7:27 PM, Peter Karich<pe...@yahoo.de>
>>>>>>
>>>> wrote:
>>>>
>>>>>>
>>>>>>> Hi James,
>>>>>>>
>>>>>>> In the constructImageMap you whill have to pass a model as well, but
>>>>>>>
>>>> I'm
>>>>
>>>>>>> not sure how :-(
>>>>>>>
>>>>>>> Another way would be to adapt constructImageMap to updateImageMap
>>>>>>> so that you can call it in ChartImage.createBufferedImage (or every
>>>>>>>
>>>> time
>>>>
>>>>>>> the model updates)
>>>>>>>
>>>>>>> BTW: For jetwick I used an html solution with div's to display bar
>>>>>>>
>>>> charts.
>>>>
>>>>>>> which is customizable by the designer (if any ;-)), readable by
>>>>>>>
>>>> spiders
>>>>
>>>>>>> etc
>>>>>>> and didn't need those imagemaps. Are you interested in this solution?
>>>>>>>
>>>> I
>>>>
>>>>>>> could blog about it.
>>>>>>>
>>>>>>> Regards,
>>>>>>> Peter (aka timetabling on twitter ;-)).
>>>>>>>
>>>>>>>
>>>>>>>> Hi Guys,
>>>>>>>>
>>>>>>>> I followed the instructions in the wiki "JFreeChart with clickable
>>>>>>>> imagemap<
>>>>>>>>
>>>>>>>
>>>> https://cwiki.apache.org/WICKET/jfreechart-with-clickable-imagemap.html>"
>>>>
>>>>>>>> to create a chart.
>>>>>>>> I have a requirement whereby the chart has to be generated
>>>>>>>>
>>>> dynamically
>>>>
>>>>>>> based
>>>>>>>
>>>>>>>> on certain inputs.
>>>>>>>> I managed to create the chart image by using LoadableDetachableModel
>>>>>>>>
>>>> but
>>>>
>>>>>>>> struggling to get the imagemap updated as the chart image changes.
>>>>>>>> Kindly give your valuable suggestions.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> --
>>>>>> Thanks&  Regards,
>>>>>> James
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> Thanks&  Regards,
>>>>> James
>>>>>
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>>
>>> --
>>> Thanks&  Regards,
>>> James
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: JFreeChart with clickable imagemap

Posted by Peter Karich <pe...@yahoo.de>.
thanks!

> Dear all,
>
> I've added a new wiki page "JFreeChart with tooltip
> example<https://cwiki.apache.org/confluence/display/WICKET/JFreeChart+with+tooltip+example>",
> which outlines the steps to follow to create JFreeChart based charts that
> can display tooltips.
>
> On Fri, Oct 1, 2010 at 3:05 PM, James <ja...@gmail.com> wrote:
>
>   
>> Thanks Ernesto.
>> I'll do the same.
>>
>>
>> On Fri, Oct 1, 2010 at 2:24 PM, Ernesto Reinaldo Barreiro <
>> reiern70@gmail.com> wrote:
>>
>>     
>>> James,
>>>
>>> why not add this "bit" to the wiki page you mentioned? So that others
>>> can avoid loosing the hours you lost;-)
>>>
>>> Cheers,
>>>
>>> Ernesto
>>>
>>> On Fri, Oct 1, 2010 at 8:18 AM, James <ja...@gmail.com> wrote:
>>>       
>>>> Guys,
>>>>
>>>> Finally managed to display the tooltip generated by JFreeChart in the
>>>>         
>>> wicket
>>>       
>>>> page by following these
>>>> instructions<
>>>>         
>>> http://markmail.org/message/r36cvdt2o3c4pki6#query:wicket%20jfreechart%20tooltips+page:1+mid:xqpnjdsj2lnkoinq+state:results
>>>       
>>>> .
>>>> Had only an example markup been given in that post, it would have saved
>>>>         
>>> lots
>>>       
>>>> of frustrating hours I spent. :-(
>>>>
>>>> For anyone looking forward for showing the tooltips in a chart generated
>>>>         
>>> by
>>>       
>>>> JFreeChart, here is the markup you might need.
>>>>
>>>> <code>
>>>>    <img wicket:id="chart" usemap="#tooltip"></img>
>>>> </code>
>>>>
>>>> For the java part, use this
>>>> code<
>>>>         
>>> http://markmail.org/message/r36cvdt2o3c4pki6#query:wicket%20jfreechart%20tooltips+page:1+mid:xqpnjdsj2lnkoinq+state:results
>>>       
>>>> .
>>>>
>>>> Your output should look something like this..
>>>>
>>>> <code>
>>>>       <img wicket:id="chart" usemap="#tooltip" src="blah blah"></img>
>>>>       <map id="tooltip" name="tooltip">
>>>>            <area/>
>>>>       </map>
>>>> </code>
>>>>
>>>>
>>>> NOTE:
>>>>
>>>>  - You must use <code> <img wicket:id="chart" usemap="#tooltip"></img>
>>>> </code> and not <code> <img wicket:id="chart" usemap="#tooltip"/>
>>>>         
>>> </code>
>>>       
>>>>  - You must use the "#" symbol before the "usemap" id.
>>>>  - The image map related html markup is generated by the api provided by
>>>> JFreeChart.
>>>>
>>>>
>>>>
>>>> On Fri, Oct 1, 2010 at 10:34 AM, James <ja...@gmail.com>
>>>>         
>>> wrote:
>>>       
>>>>         
>>>>> Hi Peter,
>>>>>
>>>>> Thanks for your prompt reply.
>>>>> I don't know how I missed this wonderful mailing list for this long..
>>>>>           
>>> ;-(
>>>       
>>>>> I have tried passing models to constructImageMap (wrapping the chart
>>>>>           
>>> image
>>>       
>>>>> object as a model) but somehow the map was not updated.
>>>>>
>>>>> I checked jetwick and it looks cool. ;-)
>>>>> Do you use JFreeChart to create those charts?
>>>>> I'm willing to try that option as well. Kindly blog about it!
>>>>>
>>>>> Thanks once again for taking your time to reply.
>>>>>
>>>>>
>>>>> On Thu, Sep 30, 2010 at 7:27 PM, Peter Karich <pe...@yahoo.de>
>>>>>           
>>> wrote:
>>>       
>>>>>           
>>>>>> Hi James,
>>>>>>
>>>>>> In the constructImageMap you whill have to pass a model as well, but
>>>>>>             
>>> I'm
>>>       
>>>>>> not sure how :-(
>>>>>>
>>>>>> Another way would be to adapt constructImageMap to updateImageMap
>>>>>> so that you can call it in ChartImage.createBufferedImage (or every
>>>>>>             
>>> time
>>>       
>>>>>> the model updates)
>>>>>>
>>>>>> BTW: For jetwick I used an html solution with div's to display bar
>>>>>>             
>>> charts.
>>>       
>>>>>> which is customizable by the designer (if any ;-)), readable by
>>>>>>             
>>> spiders
>>>       
>>>>>> etc
>>>>>> and didn't need those imagemaps. Are you interested in this solution?
>>>>>>             
>>> I
>>>       
>>>>>> could blog about it.
>>>>>>
>>>>>> Regards,
>>>>>> Peter (aka timetabling on twitter ;-)).
>>>>>>
>>>>>>             
>>>>>>> Hi Guys,
>>>>>>>
>>>>>>> I followed the instructions in the wiki "JFreeChart with clickable
>>>>>>> imagemap<
>>>>>>>               
>>>>>>             
>>> https://cwiki.apache.org/WICKET/jfreechart-with-clickable-imagemap.html>"
>>>       
>>>>>>> to create a chart.
>>>>>>> I have a requirement whereby the chart has to be generated
>>>>>>>               
>>> dynamically
>>>       
>>>>>> based
>>>>>>             
>>>>>>> on certain inputs.
>>>>>>> I managed to create the chart image by using LoadableDetachableModel
>>>>>>>               
>>> but
>>>       
>>>>>>> struggling to get the imagemap updated as the chart image changes.
>>>>>>> Kindly give your valuable suggestions.
>>>>>>>
>>>>>>>
>>>>>>>               
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>
>>>>>>
>>>>>>             
>>>>>
>>>>> --
>>>>> Thanks & Regards,
>>>>> James
>>>>>
>>>>>           
>>>>
>>>>
>>>> --
>>>> Thanks & Regards,
>>>> James
>>>>
>>>>         
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>       
>>
>> --
>> Thanks & Regards,
>> James
>>     


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: JFreeChart with clickable imagemap

Posted by James <ja...@gmail.com>.
Dear all,

I've added a new wiki page "JFreeChart with tooltip
example<https://cwiki.apache.org/confluence/display/WICKET/JFreeChart+with+tooltip+example>",
which outlines the steps to follow to create JFreeChart based charts that
can display tooltips.

On Fri, Oct 1, 2010 at 3:05 PM, James <ja...@gmail.com> wrote:

> Thanks Ernesto.
> I'll do the same.
>
>
> On Fri, Oct 1, 2010 at 2:24 PM, Ernesto Reinaldo Barreiro <
> reiern70@gmail.com> wrote:
>
>> James,
>>
>> why not add this "bit" to the wiki page you mentioned? So that others
>> can avoid loosing the hours you lost;-)
>>
>> Cheers,
>>
>> Ernesto
>>
>> On Fri, Oct 1, 2010 at 8:18 AM, James <ja...@gmail.com> wrote:
>> > Guys,
>> >
>> > Finally managed to display the tooltip generated by JFreeChart in the
>> wicket
>> > page by following these
>> > instructions<
>> http://markmail.org/message/r36cvdt2o3c4pki6#query:wicket%20jfreechart%20tooltips+page:1+mid:xqpnjdsj2lnkoinq+state:results
>> >
>> > .
>> > Had only an example markup been given in that post, it would have saved
>> lots
>> > of frustrating hours I spent. :-(
>> >
>> > For anyone looking forward for showing the tooltips in a chart generated
>> by
>> > JFreeChart, here is the markup you might need.
>> >
>> > <code>
>> >    <img wicket:id="chart" usemap="#tooltip"></img>
>> > </code>
>> >
>> > For the java part, use this
>> > code<
>> http://markmail.org/message/r36cvdt2o3c4pki6#query:wicket%20jfreechart%20tooltips+page:1+mid:xqpnjdsj2lnkoinq+state:results
>> >
>> > .
>> >
>> > Your output should look something like this..
>> >
>> > <code>
>> >       <img wicket:id="chart" usemap="#tooltip" src="blah blah"></img>
>> >       <map id="tooltip" name="tooltip">
>> >            <area/>
>> >       </map>
>> > </code>
>> >
>> >
>> > NOTE:
>> >
>> >  - You must use <code> <img wicket:id="chart" usemap="#tooltip"></img>
>> > </code> and not <code> <img wicket:id="chart" usemap="#tooltip"/>
>> </code>
>> >  - You must use the "#" symbol before the "usemap" id.
>> >  - The image map related html markup is generated by the api provided by
>> > JFreeChart.
>> >
>> >
>> >
>> > On Fri, Oct 1, 2010 at 10:34 AM, James <ja...@gmail.com>
>> wrote:
>> >
>> >> Hi Peter,
>> >>
>> >> Thanks for your prompt reply.
>> >> I don't know how I missed this wonderful mailing list for this long..
>> ;-(
>> >>
>> >> I have tried passing models to constructImageMap (wrapping the chart
>> image
>> >> object as a model) but somehow the map was not updated.
>> >>
>> >> I checked jetwick and it looks cool. ;-)
>> >> Do you use JFreeChart to create those charts?
>> >> I'm willing to try that option as well. Kindly blog about it!
>> >>
>> >> Thanks once again for taking your time to reply.
>> >>
>> >>
>> >> On Thu, Sep 30, 2010 at 7:27 PM, Peter Karich <pe...@yahoo.de>
>> wrote:
>> >>
>> >>> Hi James,
>> >>>
>> >>> In the constructImageMap you whill have to pass a model as well, but
>> I'm
>> >>> not sure how :-(
>> >>>
>> >>> Another way would be to adapt constructImageMap to updateImageMap
>> >>> so that you can call it in ChartImage.createBufferedImage (or every
>> time
>> >>> the model updates)
>> >>>
>> >>> BTW: For jetwick I used an html solution with div's to display bar
>> charts.
>> >>> which is customizable by the designer (if any ;-)), readable by
>> spiders
>> >>> etc
>> >>> and didn't need those imagemaps. Are you interested in this solution?
>> I
>> >>> could blog about it.
>> >>>
>> >>> Regards,
>> >>> Peter (aka timetabling on twitter ;-)).
>> >>>
>> >>> > Hi Guys,
>> >>> >
>> >>> > I followed the instructions in the wiki "JFreeChart with clickable
>> >>> > imagemap<
>> >>>
>> https://cwiki.apache.org/WICKET/jfreechart-with-clickable-imagemap.html>"
>> >>> > to create a chart.
>> >>> > I have a requirement whereby the chart has to be generated
>> dynamically
>> >>> based
>> >>> > on certain inputs.
>> >>> > I managed to create the chart image by using LoadableDetachableModel
>> but
>> >>> > struggling to get the imagemap updated as the chart image changes.
>> >>> > Kindly give your valuable suggestions.
>> >>> >
>> >>> >
>> >>>
>> >>>
>> >>> ---------------------------------------------------------------------
>> >>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> >>> For additional commands, e-mail: users-help@wicket.apache.org
>> >>>
>> >>>
>> >>
>> >>
>> >> --
>> >> Thanks & Regards,
>> >> James
>> >>
>> >
>> >
>> >
>> > --
>> > Thanks & Regards,
>> > James
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>
> --
> Thanks & Regards,
> James
>



-- 
Thanks & Regards,
James

Re: JFreeChart with clickable imagemap

Posted by James <ja...@gmail.com>.
Thanks Ernesto.
I'll do the same.

On Fri, Oct 1, 2010 at 2:24 PM, Ernesto Reinaldo Barreiro <
reiern70@gmail.com> wrote:

> James,
>
> why not add this "bit" to the wiki page you mentioned? So that others
> can avoid loosing the hours you lost;-)
>
> Cheers,
>
> Ernesto
>
> On Fri, Oct 1, 2010 at 8:18 AM, James <ja...@gmail.com> wrote:
> > Guys,
> >
> > Finally managed to display the tooltip generated by JFreeChart in the
> wicket
> > page by following these
> > instructions<
> http://markmail.org/message/r36cvdt2o3c4pki6#query:wicket%20jfreechart%20tooltips+page:1+mid:xqpnjdsj2lnkoinq+state:results
> >
> > .
> > Had only an example markup been given in that post, it would have saved
> lots
> > of frustrating hours I spent. :-(
> >
> > For anyone looking forward for showing the tooltips in a chart generated
> by
> > JFreeChart, here is the markup you might need.
> >
> > <code>
> >    <img wicket:id="chart" usemap="#tooltip"></img>
> > </code>
> >
> > For the java part, use this
> > code<
> http://markmail.org/message/r36cvdt2o3c4pki6#query:wicket%20jfreechart%20tooltips+page:1+mid:xqpnjdsj2lnkoinq+state:results
> >
> > .
> >
> > Your output should look something like this..
> >
> > <code>
> >       <img wicket:id="chart" usemap="#tooltip" src="blah blah"></img>
> >       <map id="tooltip" name="tooltip">
> >            <area/>
> >       </map>
> > </code>
> >
> >
> > NOTE:
> >
> >  - You must use <code> <img wicket:id="chart" usemap="#tooltip"></img>
> > </code> and not <code> <img wicket:id="chart" usemap="#tooltip"/> </code>
> >  - You must use the "#" symbol before the "usemap" id.
> >  - The image map related html markup is generated by the api provided by
> > JFreeChart.
> >
> >
> >
> > On Fri, Oct 1, 2010 at 10:34 AM, James <ja...@gmail.com> wrote:
> >
> >> Hi Peter,
> >>
> >> Thanks for your prompt reply.
> >> I don't know how I missed this wonderful mailing list for this long..
> ;-(
> >>
> >> I have tried passing models to constructImageMap (wrapping the chart
> image
> >> object as a model) but somehow the map was not updated.
> >>
> >> I checked jetwick and it looks cool. ;-)
> >> Do you use JFreeChart to create those charts?
> >> I'm willing to try that option as well. Kindly blog about it!
> >>
> >> Thanks once again for taking your time to reply.
> >>
> >>
> >> On Thu, Sep 30, 2010 at 7:27 PM, Peter Karich <pe...@yahoo.de> wrote:
> >>
> >>> Hi James,
> >>>
> >>> In the constructImageMap you whill have to pass a model as well, but
> I'm
> >>> not sure how :-(
> >>>
> >>> Another way would be to adapt constructImageMap to updateImageMap
> >>> so that you can call it in ChartImage.createBufferedImage (or every
> time
> >>> the model updates)
> >>>
> >>> BTW: For jetwick I used an html solution with div's to display bar
> charts.
> >>> which is customizable by the designer (if any ;-)), readable by spiders
> >>> etc
> >>> and didn't need those imagemaps. Are you interested in this solution? I
> >>> could blog about it.
> >>>
> >>> Regards,
> >>> Peter (aka timetabling on twitter ;-)).
> >>>
> >>> > Hi Guys,
> >>> >
> >>> > I followed the instructions in the wiki "JFreeChart with clickable
> >>> > imagemap<
> >>>
> https://cwiki.apache.org/WICKET/jfreechart-with-clickable-imagemap.html>"
> >>> > to create a chart.
> >>> > I have a requirement whereby the chart has to be generated
> dynamically
> >>> based
> >>> > on certain inputs.
> >>> > I managed to create the chart image by using LoadableDetachableModel
> but
> >>> > struggling to get the imagemap updated as the chart image changes.
> >>> > Kindly give your valuable suggestions.
> >>> >
> >>> >
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >>> For additional commands, e-mail: users-help@wicket.apache.org
> >>>
> >>>
> >>
> >>
> >> --
> >> Thanks & Regards,
> >> James
> >>
> >
> >
> >
> > --
> > Thanks & Regards,
> > James
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Thanks & Regards,
James

Re: JFreeChart with clickable imagemap

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
James,

why not add this "bit" to the wiki page you mentioned? So that others
can avoid loosing the hours you lost;-)

Cheers,

Ernesto

On Fri, Oct 1, 2010 at 8:18 AM, James <ja...@gmail.com> wrote:
> Guys,
>
> Finally managed to display the tooltip generated by JFreeChart in the wicket
> page by following these
> instructions<http://markmail.org/message/r36cvdt2o3c4pki6#query:wicket%20jfreechart%20tooltips+page:1+mid:xqpnjdsj2lnkoinq+state:results>
> .
> Had only an example markup been given in that post, it would have saved lots
> of frustrating hours I spent. :-(
>
> For anyone looking forward for showing the tooltips in a chart generated by
> JFreeChart, here is the markup you might need.
>
> <code>
>    <img wicket:id="chart" usemap="#tooltip"></img>
> </code>
>
> For the java part, use this
> code<http://markmail.org/message/r36cvdt2o3c4pki6#query:wicket%20jfreechart%20tooltips+page:1+mid:xqpnjdsj2lnkoinq+state:results>
> .
>
> Your output should look something like this..
>
> <code>
>       <img wicket:id="chart" usemap="#tooltip" src="blah blah"></img>
>       <map id="tooltip" name="tooltip">
>            <area/>
>       </map>
> </code>
>
>
> NOTE:
>
>  - You must use <code> <img wicket:id="chart" usemap="#tooltip"></img>
> </code> and not <code> <img wicket:id="chart" usemap="#tooltip"/> </code>
>  - You must use the "#" symbol before the "usemap" id.
>  - The image map related html markup is generated by the api provided by
> JFreeChart.
>
>
>
> On Fri, Oct 1, 2010 at 10:34 AM, James <ja...@gmail.com> wrote:
>
>> Hi Peter,
>>
>> Thanks for your prompt reply.
>> I don't know how I missed this wonderful mailing list for this long.. ;-(
>>
>> I have tried passing models to constructImageMap (wrapping the chart image
>> object as a model) but somehow the map was not updated.
>>
>> I checked jetwick and it looks cool. ;-)
>> Do you use JFreeChart to create those charts?
>> I'm willing to try that option as well. Kindly blog about it!
>>
>> Thanks once again for taking your time to reply.
>>
>>
>> On Thu, Sep 30, 2010 at 7:27 PM, Peter Karich <pe...@yahoo.de> wrote:
>>
>>> Hi James,
>>>
>>> In the constructImageMap you whill have to pass a model as well, but I'm
>>> not sure how :-(
>>>
>>> Another way would be to adapt constructImageMap to updateImageMap
>>> so that you can call it in ChartImage.createBufferedImage (or every time
>>> the model updates)
>>>
>>> BTW: For jetwick I used an html solution with div's to display bar charts.
>>> which is customizable by the designer (if any ;-)), readable by spiders
>>> etc
>>> and didn't need those imagemaps. Are you interested in this solution? I
>>> could blog about it.
>>>
>>> Regards,
>>> Peter (aka timetabling on twitter ;-)).
>>>
>>> > Hi Guys,
>>> >
>>> > I followed the instructions in the wiki "JFreeChart with clickable
>>> > imagemap<
>>> https://cwiki.apache.org/WICKET/jfreechart-with-clickable-imagemap.html>"
>>> > to create a chart.
>>> > I have a requirement whereby the chart has to be generated dynamically
>>> based
>>> > on certain inputs.
>>> > I managed to create the chart image by using LoadableDetachableModel but
>>> > struggling to get the imagemap updated as the chart image changes.
>>> > Kindly give your valuable suggestions.
>>> >
>>> >
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>>
>> --
>> Thanks & Regards,
>> James
>>
>
>
>
> --
> Thanks & Regards,
> James
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: JFreeChart with clickable imagemap

Posted by James <ja...@gmail.com>.
Guys,

Finally managed to display the tooltip generated by JFreeChart in the wicket
page by following these
instructions<http://markmail.org/message/r36cvdt2o3c4pki6#query:wicket%20jfreechart%20tooltips+page:1+mid:xqpnjdsj2lnkoinq+state:results>
.
Had only an example markup been given in that post, it would have saved lots
of frustrating hours I spent. :-(

For anyone looking forward for showing the tooltips in a chart generated by
JFreeChart, here is the markup you might need.

<code>
    <img wicket:id="chart" usemap="#tooltip"></img>
</code>

For the java part, use this
code<http://markmail.org/message/r36cvdt2o3c4pki6#query:wicket%20jfreechart%20tooltips+page:1+mid:xqpnjdsj2lnkoinq+state:results>
.

Your output should look something like this..

<code>
       <img wicket:id="chart" usemap="#tooltip" src="blah blah"></img>
       <map id="tooltip" name="tooltip">
            <area/>
       </map>
</code>


NOTE:

  - You must use <code> <img wicket:id="chart" usemap="#tooltip"></img>
</code> and not <code> <img wicket:id="chart" usemap="#tooltip"/> </code>
  - You must use the "#" symbol before the "usemap" id.
  - The image map related html markup is generated by the api provided by
JFreeChart.



On Fri, Oct 1, 2010 at 10:34 AM, James <ja...@gmail.com> wrote:

> Hi Peter,
>
> Thanks for your prompt reply.
> I don't know how I missed this wonderful mailing list for this long.. ;-(
>
> I have tried passing models to constructImageMap (wrapping the chart image
> object as a model) but somehow the map was not updated.
>
> I checked jetwick and it looks cool. ;-)
> Do you use JFreeChart to create those charts?
> I'm willing to try that option as well. Kindly blog about it!
>
> Thanks once again for taking your time to reply.
>
>
> On Thu, Sep 30, 2010 at 7:27 PM, Peter Karich <pe...@yahoo.de> wrote:
>
>> Hi James,
>>
>> In the constructImageMap you whill have to pass a model as well, but I'm
>> not sure how :-(
>>
>> Another way would be to adapt constructImageMap to updateImageMap
>> so that you can call it in ChartImage.createBufferedImage (or every time
>> the model updates)
>>
>> BTW: For jetwick I used an html solution with div's to display bar charts.
>> which is customizable by the designer (if any ;-)), readable by spiders
>> etc
>> and didn't need those imagemaps. Are you interested in this solution? I
>> could blog about it.
>>
>> Regards,
>> Peter (aka timetabling on twitter ;-)).
>>
>> > Hi Guys,
>> >
>> > I followed the instructions in the wiki "JFreeChart with clickable
>> > imagemap<
>> https://cwiki.apache.org/WICKET/jfreechart-with-clickable-imagemap.html>"
>> > to create a chart.
>> > I have a requirement whereby the chart has to be generated dynamically
>> based
>> > on certain inputs.
>> > I managed to create the chart image by using LoadableDetachableModel but
>> > struggling to get the imagemap updated as the chart image changes.
>> > Kindly give your valuable suggestions.
>> >
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>
> --
> Thanks & Regards,
> James
>



-- 
Thanks & Regards,
James

Re: JFreeChart with clickable imagemap

Posted by Peter Karich <pe...@yahoo.de>.
Hi James!

> I checked jetwick and it looks cool. ;-)
>   
hey, thanks ;-)

> Do you use JFreeChart to create those charts?
>   

initially I did. But now only that tiny bar image is stolen from
jfreechart :-)

http://jetwick.com/img/bar-min.png

the rest is created via divs and css and a bit java 'magic'. settings
the height of a div is all:
Label bar = new Label("itemSpan");
bar.add(new AttributeAppender("style", new Model("height:" + (int)
(zoomer * entry.count) + "px"), " "));

> I'm willing to try that option as well. Kindly blog about it!

Finally I did a small post here:

http://karussell.wordpress.com/2010/10/01/barchart-with-wicket-and-pure-html/

please comment if something is against wicket philosophy or if it
contains bugs etc

Regards,
Peter.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: JFreeChart with clickable imagemap

Posted by James <ja...@gmail.com>.
Hi Peter,

Thanks for your prompt reply.
I don't know how I missed this wonderful mailing list for this long.. ;-(

I have tried passing models to constructImageMap (wrapping the chart image
object as a model) but somehow the map was not updated.

I checked jetwick and it looks cool. ;-)
Do you use JFreeChart to create those charts?
I'm willing to try that option as well. Kindly blog about it!

Thanks once again for taking your time to reply.

On Thu, Sep 30, 2010 at 7:27 PM, Peter Karich <pe...@yahoo.de> wrote:

> Hi James,
>
> In the constructImageMap you whill have to pass a model as well, but I'm
> not sure how :-(
>
> Another way would be to adapt constructImageMap to updateImageMap
> so that you can call it in ChartImage.createBufferedImage (or every time
> the model updates)
>
> BTW: For jetwick I used an html solution with div's to display bar charts.
> which is customizable by the designer (if any ;-)), readable by spiders etc
> and didn't need those imagemaps. Are you interested in this solution? I
> could blog about it.
>
> Regards,
> Peter (aka timetabling on twitter ;-)).
>
> > Hi Guys,
> >
> > I followed the instructions in the wiki "JFreeChart with clickable
> > imagemap<
> https://cwiki.apache.org/WICKET/jfreechart-with-clickable-imagemap.html>"
> > to create a chart.
> > I have a requirement whereby the chart has to be generated dynamically
> based
> > on certain inputs.
> > I managed to create the chart image by using LoadableDetachableModel but
> > struggling to get the imagemap updated as the chart image changes.
> > Kindly give your valuable suggestions.
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Thanks & Regards,
James

Re: JFreeChart with clickable imagemap

Posted by Peter Karich <pe...@yahoo.de>.
Hi James,

In the constructImageMap you whill have to pass a model as well, but I'm
not sure how :-(

Another way would be to adapt constructImageMap to updateImageMap
so that you can call it in ChartImage.createBufferedImage (or every time
the model updates)

BTW: For jetwick I used an html solution with div's to display bar charts.
which is customizable by the designer (if any ;-)), readable by spiders etc
and didn't need those imagemaps. Are you interested in this solution? I
could blog about it.

Regards,
Peter (aka timetabling on twitter ;-)).

> Hi Guys,
>
> I followed the instructions in the wiki "JFreeChart with clickable
> imagemap<https://cwiki.apache.org/WICKET/jfreechart-with-clickable-imagemap.html>"
> to create a chart.
> I have a requirement whereby the chart has to be generated dynamically based
> on certain inputs.
> I managed to create the chart image by using LoadableDetachableModel but
> struggling to get the imagemap updated as the chart image changes.
> Kindly give your valuable suggestions.
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: JFreeChart with clickable imagemap

Posted by jwray <jw...@gmail.com>.

Hi,

A little late maybe but since I wrote that wiki page I've improved the code
to use models and so be responsive to data changes. 

Here's a link to a gist providing a wicket component that allows a
JFreeChart to be displayed with both tooltips and clickable entities. 

http://gist.github.com/647285

Jonny
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/JFreeChart-with-clickable-imagemap-tp2720220p3017976.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org