• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

JFreeChart problem (No axis label)

 
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have modified the source code of JFreeChart in the file called BarRenderer. In this file, I made the following change to it


So that it animates when the chart comes in (fly-in effect)
Here it how it is called.

However, I didn't know why the axis labels were gone
Here is how it looks on rendering


I wanna know why the labels were gone.

Thanks
Jack
 
Bartender
Posts: 1166
17
Netbeans IDE Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I suspect you are going to have trouble getting a 'fix' for this problem. I for one am not going to go through all that code to try to understand it and I suspect most people here will feel the same. Also, I do not know which JFreeChart version you based this on to see what changes you made and though I use JFreeChart and have a version of the source code it may not be the version you started from. If there was an SSCCE then I might be inclined to run it and look for the obvious but I'm not willing to generate one for you.
 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, I didn't clarify this

The changes I have made were
1) adding a branch to the drawItem method, so that when it is "set" and a count has been added




This will affect the g2.fill(bar) method, and there will be a repetition of g2.fill(bar) calls for i number of times.
which there was a pre-shift of location x for the bar, I didn't change the rest of the code.
The only I notice was

getItemLabelGenerator is using row and column parameters of drawItem method which shouldn't be affected by the
code preceding it. Here, when I set a breakpoint inside getItemLabelGenerator

I will get a null from the above method.
That's it. Hope you understand.
Thanks
Jack
 
Richard Tookey
Bartender
Posts: 1166
17
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jacky Luk wrote:Sorry, I didn't clarify this



To my mind you still haven't clarified it! In fact, if anything I think you have added to my confusion. In your first post you did not post the code for setMove() or Increment() and I still can't see what they are supposed to do. Sorry but I think you need to post an SSCCE ( <- follow the link) to stand any chance.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic