Smart Labels/Annotations

Nov 10, 2013 at 2:13 PM
Hello there,

first, great work - it is by far the easiest and most robust plotting library i came across yet.

I have a case where i want to display a lot of additional information about a data point.
I can put the detailed information in a custom tracker, that works great.

But i also want a summary of additional information right by the data point.
Annotation or even labels work great for that too.

Only limitation i found was when the plot is zoomed out and the annotations or labels overlap.

Is there some kind of smart annotation/label behavior planned?
Im thinking about auto hiding/collapsing overlapping annotations, so they become completely visible only when you zoom in.

Or even smart positioning for Arrow annotations, only the EndPoint is set and it looks for a non overlapping StartPoint by itself using some basic parameters (min distance, max distance etc.).
Coordinator
Nov 11, 2013 at 6:39 PM
It is not planned, but that's a good idea. And making it smart will probably be a bit challenging :) Can you add a spec of a the new feature in the Issues?
I think it should be implemented as new annotation types, to keep the original ones "simple and stupid".
Nov 11, 2013 at 7:43 PM
Edited Nov 11, 2013 at 10:11 PM
Hello objo,

thanks for reply!
A new annotation type would be great too. I'm already playing around with some algorithms I found so far, I will try to contribute to that.
But yes, it is really challenging - there are whole papers about it.

Here are some useful information I found about the topic:
Force based Label placement sample in JS from the D3 project
Label placement on scatter charts
2006 Microsoft Patent for label placement, pretty useless but i guess that is what is used in MS Chart
Very nice dissertation from 1999
Nice paper about different algorithms

The term "smart" came from the MS Chart control, which I used for a customer in a WinForms application till now.
There you have "smart labels" which do mostly what i described and I think can be a good basis to look at for useful features.

If I cant do it myself I will add it in the Issues later.