Tobias S
Tobias S

Reputation: 13

Jfreechart TimeSeriesChart Label on Last Item

I need a label on each last Item of all Series in Jfreechart's TimeSeriesChart.

The data I used is generated from a Database, so there's a way to get each last position of a Series.

Before:

https://i.sstatic.net/SYOMc.png

After: https://i.sstatic.net/SVpMM.png

Upvotes: 1

Views: 259

Answers (1)

trashgod
trashgod

Reputation: 205875

You should be able to use a custom XYItemLabelGenerator, as shown here. Return null for each item in the series except the last.

Upvotes: 1

Related Questions