0

I have asked a few questions about JFreeChart before, so there is a simple demp app, but I have noticed some text will have an underline, but others don't, as seen in the following image, why ? How to omit the underline ?

enter image description here

Here is a screenshot for the new version :

enter image description here

Here is the latest screenshot :

enter image description here

Frank
  • 30,590
  • 58
  • 161
  • 244
  • I can't reproduce this with [tag:jfreechart] v1.5.3 under java 8, 11 or 17. – trashgod Mar 09 '22 at 22:52
  • I switched to predefined colors; try it now. – trashgod Mar 09 '22 at 23:35
  • I tried the new version, no change, see screenshot. I'm running JDK8 on Win7. – Frank Mar 10 '22 at 16:01
  • Odd that it's only some labels; you might try a different font size. None of the available L&Fs evinced the problem on Java 8, OS X, e.g. `-Dswing.defaultlaf=com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel`. – trashgod Mar 10 '22 at 17:19
  • I tried "-Dswing.defaultlaf=com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel", no difference. I also tried font size 16, different labels will have underline, some didn't have underline with size 14 will have underline at 16, others which had underline at 14 show no underline at 16. – Frank Mar 10 '22 at 20:04
  • How the the [demo](https://stackoverflow.com/a/21180275/230513) look? I think the default theme uses Tahoma; you might try a different font. – trashgod Mar 11 '22 at 12:26
  • That demo looks correct, no underline. Why Tahoma sometimes has underline, sometimes doesn't ? – Frank Mar 11 '22 at 18:56
  • I pushed an update for minor issues. I've no idea why the underline varies with font size, but I never see it on macOS. Is it a Windows issue? – trashgod Mar 11 '22 at 22:34
  • OK, maybe it's a Windows issue. I even tried it on the latest Win11 [ NT6.2 ], also got underline on some labels. – Frank Mar 14 '22 at 16:06
  • It looks like the light underline "disappears" when it coincides with the underlying gridline; you might tinker with the `XYPlot` gridline paint. I pushed another update to normalize colors. – trashgod Mar 14 '22 at 18:01
  • I thought so too, but it may not be for that reason, I just added the latest screenshots. – Frank Mar 14 '22 at 22:25
  • Your counter-example negates my hypothesis. I can't explain why `CrosshairOverlayDemo1` looks correct, but `PriceVolumeChart` doesn't. – trashgod Mar 15 '22 at 00:22

0 Answers0