jfreechart: Gantt Chart Task Label Font Size

后端 未结 2 1545
萌比男神i
萌比男神i 2021-01-29 05:26

I put my Gantt Chart (ChartPanel) in a JScrollPane,and create a button named [zoom in].
The function for the button [zoom in] is:
When I click [zoom in] button, the widt

相关标签:
2条回答
  • 2021-01-29 06:01

    Absent a complete example, this appears to be an artifact of adding a ChartPanel directly to a JscrollPane. Instead, use a SlidingGanttCategoryDataset which permits the use of setFirstCategoryIndex() in response to a scrollbar state change. SlidingGanttDatasetDemo1 is a complete example.

    0 讨论(0)
  • 2021-01-29 06:05

    I got the answer to solve my problem.

    Call ChartPanel.setMinimumDrawWidth/Height with small value and ChartPanel.setMaximumDrawWidth/Height with large values than exceed the screen size of your monitor. Then, the ChartPanel will be scaled without being distorted.

    Please refer to: How to aviod axis label and legend scaling

    0 讨论(0)
提交回复
热议问题