Search found 13 matches

by mathematical
Tue May 22, 2007 4:47 pm
Forum: JFreeChart
Topic: Scrolling Graph example ..
Replies: 17
Views: 46673

After a lot of hard work, I got the results that I wanted. I admit that this is not the best solution and it's more of a work around but non the less it did solve the issue. My final approach to attain a scrollable graph was to create an interface titled ScrollablePlot and create a ScrollableCategor...
by mathematical
Fri May 18, 2007 1:47 pm
Forum: JFreeChart
Topic: Scrolling Graph example ..
Replies: 17
Views: 46673

Heres the approach that I'm taking... I created a class called ScrollableCategoryPlot and so far I added the following fields: //code... private ObjectList totalDatasets; private int numberOfCategoriesDisplayed; private int numberOfCategoriesSkipped; //more code... So far I've written their get and ...
by mathematical
Tue May 15, 2007 10:26 pm
Forum: JFreeChart
Topic: Scrolling Graph example ..
Replies: 17
Views: 46673

ok no response, lets try again...I'll ask a better question this time. How would I go about subclassing the CategoryAxis class to give it a way to be updated by a JSlider object? It looks like its very involved but I'm willing to get my hands dirty to solve this issue. I cant be the only one working...
by mathematical
Tue May 15, 2007 3:46 pm
Forum: JFreeChart
Topic: Scrolling Graph example ..
Replies: 17
Views: 46673

I'm also stuck here with a getDomainAxis() but no setDomain() method. I'm trying to make my graph vertically scrollable using the JSlider class as used in previous posts.

So heres my question, is there a way to vertically scroll a category bar graph with a JSlider using the getDomainAxis() method?
by mathematical
Fri May 04, 2007 7:07 pm
Forum: JFreeChart
Topic: Background Paint of Bar Graph
Replies: 6
Views: 9301

Solved it. Heres what i did, I created a class called CustomCategoryPlot that extends CategoryPlot. Then I overrided the draw method and the getPlotType method and in the draw method I took the dataArea width and height and simply assigned it to two private int variables. Finally I made the two acce...
by mathematical
Thu May 03, 2007 10:14 pm
Forum: JFreeChart
Topic: Background Paint of Bar Graph
Replies: 6
Views: 9301

Heres some sample code to illustrate my issue: //initialize JFreeChart object.... //set up background image Image image; double BAR_WIDTH_PERCENT = 0.06; double BAR_SPACE_PERCENT = 0.02; double CLIENT_SPACE_PERCENT = 0.05; double TOP_MARGIN_PERCENT = 0.05; int BAR_OFFSET_PIXELS = 8; int BACKGROUND_T...
by mathematical
Thu May 03, 2007 8:48 pm
Forum: JFreeChart
Topic: Background Paint of Bar Graph
Replies: 6
Views: 9301

That actually did not address my question. I know how to set the color of the bars in a bar graph. What I wanted to know was is there a way to set a color behind the bars for a given category. In the api the only real way to do this is to dynamically create an image and then set the image using the ...
by mathematical
Thu May 03, 2007 2:47 pm
Forum: JFreeChart
Topic: Background Paint of Bar Graph
Replies: 6
Views: 9301

Background Paint of Bar Graph

Is there a way to set the background paint of a bar graph into a different color for every category? Or to have the background paint gray on one category and white on the next and so on. I need this functionality because it would make my graph easier to read. I'm working with a lot of data and the m...
by mathematical
Thu May 03, 2007 2:13 pm
Forum: JFreeChart
Topic: Bar Graph and Bar Width
Replies: 2
Views: 5148

Thank you for the setMaximumBarWidth() method it actually helped me out a lot. I had another issue but I figured it out, Thanks again.
by mathematical
Wed May 02, 2007 9:02 pm
Forum: JFreeChart
Topic: Bar Graph and Bar Width
Replies: 2
Views: 5148

Bar Graph and Bar Width

I have a horizontal bar graph and I need to keep the bar width the same regardless of how many categories are displayed. I understand that there is no method to directly set the width of a bar, and I have been trying to do it indirectly by setting all of the setXXXMargin() methods. The setXXXMargin(...
by mathematical
Mon Apr 30, 2007 8:02 pm
Forum: JFreeChart
Topic: CategoryPlot and BarRenderer issue
Replies: 4
Views: 7048

Thank you Mr West for pointing out the obvious fact that I didn't see how to derive row and columns out of a bar graph. Now that I made the connection here is some code for those that have the same issue or that dont see the "obvious". String[] labels = { "test1a", "test2a", "test3a", "test4a", //fi...
by mathematical
Mon Apr 30, 2007 6:10 pm
Forum: JFreeChart
Topic: CategoryPlot and BarRenderer issue
Replies: 4
Views: 7048

Ok so here is what I did: BarRenderer barRenderer = (BarRenderer) categoryPlot.getRenderer(); CustomCategoryItemLabelGenerator generator = new CustomCategoryItemLabelGenerator("text in bar"); barRenderer.setItemLabelGenerator(generator); barRenderer.setItemLabelsVisible(true); And here is the code f...
by mathematical
Mon Apr 30, 2007 3:56 pm
Forum: JFreeChart
Topic: CategoryPlot and BarRenderer issue
Replies: 4
Views: 7048

CategoryPlot and BarRenderer issue

I am trying to figure out how to display a String inside every bar in my horizontal bar graph. I want to be able to display different Strings inside different bars on the same graph. I already have the ItemLabel alignment all I need is the ability to show different Strings that have nothing to do wi...