I have a JFree Bar Chart. the dataset is populated using DefaultCategoryDataset , There may be situations when the values on both the domain and range axis are such that these values are not very clearly visible.
I need something like a scrollPane into which the chart can be added. But it looks like the ChartPanel cannot be added into a JScrollPane
Is there any way of doing this ?
Thanks Bhavya
You can use
setLowerMargin()
and/orgetUpperMargin()
on the relevantCategoryAxis
to improve the appearance. Alternatively, you can use aSlidingCategoryDataset
in conjunction with aJSlider
.Addendum: A third alternative is to use zooming, which is enabled by default, as shown here.