• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

adding image on TimeSeries Chart in JFreeChart

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Posted: Tue Jul 22, 2008 2:36 am Post subject: adding image on TimeSeries Chart

--------------------------------------------------------------------------------

Hi all
I want to add images at particular points in Time Series chart.
In normal XYChart this can be achieved using annotation as below

XYPlot plot = chart.getXYPlot();
ImageIcon imageIcon = null;
imageIcon = new ImageIcon("D:/JFreeChartDemo/JFreeChartDemo/src/demo1/img2.png");
XYAnnotation xyannotation = null;
xyannotation = new XYImageAnnotation(10, 10, imageIcon.getImage());
plot.addAnnotation(xyannotation);

Above code will display image at co-ordinates (10,10).

I tried to do same thing for Time Seried chart but failed. I think I am not getting the co-ordinates right. As it is a Time Series chart X-axis represents time (in my case seconds) and I think I am giving wrong X-offset.
Can anybody help.

Thansk in advance,
Aniket
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Aniket,

I am having the same problem. Have you found a solution?

Thanks in advance,
Itay
 
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Itay and welcome to Javaranch!

Please do start a new thread with your exact problem. We try not to wake up old threads

Thanks!
 
I hired a bunch of ninjas. The fridge is empty, but I can't find them to tell them the mission.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic