swing - Drawing Java 2D Charts span across multiple views or panels or horizontal-scrolling -
I'm writing the graph using Java 2D graphics (i.e. to draw and fill rectangles) directly on grafry Stored in an array list from the set of values. But when ArrayList has a lot of value (can go up to 3500 sizes), the picture is compressed - where the graph looks less informative and the labels on the X-X are also not displayed. Is there a way to make the graph visible in many page-wise ways (i.e. limited to say that a page can show 100 values - remaining in different pages where users can navigate page-wise) .
How can I see such a situation? Is there a stacked layout that I can use? Can I use the panel? But then can I pull half way through the panels (because the graph is dragged inside the loop - unless the elements in the array list read it)? Or can I have a scroll panel?
Appreciate any insights, suggestions and ideas.
A quick solution is just to keep your panel in one. You can also use one. Just place the graph on the N page and show the 1 / nth part of the article on each page. It should be relatively easy, because you are portraying the graph themselves. Frankly, you do not even have a card layout for whatever you are doing. When the button is pushed, just tell your Chart Panel that part of the graph is shown and accordingly it is updated accordingly.
Using another option is to use the Charting Library rather than manually making your chart, it is a commonly used library that allows the user to zoom in and out in the chart.
Comments
Post a Comment