• 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

JFreechart +

 
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

i am making a simple jfreechart application.I am able to display the xy plot.For large data values of x cordinates,it display the x cordinate value in integer ,but the problem is if i take small data values of x cordinates the integers are not displayed instead double values are displayed.For ex

for (int k = 0; k <digitArray.length ; k++)
{
series.add(k, digitArray[k]);
}

where series is XYSeries object, digitArray is an int array containing 23 elements,then x cordinates is displayed in double instead of 0,1,2....22(k values here) etc but if i increase the digitArray elements to say 50 then the x cordinates values values are displayed in integers.How to solve this problem.And also can we display the x cordinates in reverse fashion like starting with the last element to the 0th one.Please answer my queries.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's an option to use only integer values for the axes. You need to get the ValueAxis object from the Plot (which you can get from the JFreeChart object). You may have to cast the Plot object to XYPlot to do this.
 
Ajay Singh
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks ulf for the reply
 
She still doesn't approve of my superhero lifestyle. Or this shameless plug:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic