Jfreechart annotations disappearing

前端 未结 1 1856
-上瘾入骨i
-上瘾入骨i 2021-01-24 13:53

I plot a curve with JFreechart. Then the user can draw ranges by dragging the mouse. These I plot using AbstractChartAnnotation to draw a filled Path2D. So far so nice - all ali

1条回答
  •  失恋的感觉
    2021-01-24 14:47

    You might look at the Layer to which the annotation is being added. There's an example here. Naturally, an sscce that exhibits the problem you describe would help clarify the source of the problem.

    Addendum: One potential problem is that your implementation of Comparable is not consistent with equals(), as the latter relies (implicitly) on the super-class implementation. A consistent implementation is required for use with a sorted Set such as TreeSet. You'll need to override hashCode(), too. Class Value is an example.

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