Scrollable JFree domain axis and custom marker label

后端 未结 1 622
长发绾君心
长发绾君心 2021-01-23 09:08

I have this code to draw graph, this works fine. I need two things here

  1. on domain axis (x) I want to be able to scroll.
  2. On markers I see a thick bold line
1条回答
  •  别那么骄傲
    2021-01-23 09:34

    You'll have to combine several approaches:

    1. Domain scrolling alternatives:

      • Try a SlidingXYDataset, implemented here and illustrated here.
      • Enable panning, e.g. plot.setDomainPannable(true), as suggested here.
      • Look at paging.
      • Use a JScrollPane, e.g. add(new JScrollPane(chartPanel);.
    2. Marker text: Use XYTextAnnotation, for example.

    3. Format dates: Replace the factory's axis with a DateAxis and use setDateFormatOverride(), for example.

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