For our purposes, we use multiple lines in a title to display contextual information and often times units. If it's important, I also tried manually sizing the legend boxes. This did not fix the overlapping problem. Is there a setting on the LegendBoxXY I overlooked that could resolve this problem?
- ClippedLegendBoxEntries.PNG (28.79 KiB) Viewed 2045 times
Multiline series title in LegendBox currently is not supported. Therefore, you see this overlap as only one line is allocate per series.
Annotation text is more flexible in such formatting (i.e. multiline text is supported there). Unfortunately, only one color per annotation is allowed.
Series.Title.Text itself could be multiline, but to arrange next to other Title maybe tricky. For example, it possible to use Series.Title.DrawRectagle and Series.Title.Offset properties to achieve desired effect.
All the best.
The chart supports showing multiple lines of different colors in the same AxisY. But the only way to have titles for each line without covering up the data seems to be Legend Boxes. Annotations seem to be tied to specific data points, not a screen position. So zooming and panning gets complicated. And I can look into manually positioning series titles, but the Legend Box does almost everything we need - it nicely positions titles without covering up the data. You can hover over a legend box entry and highlight the associated signal. The title text and color all match up automatically. The only issue is having multiple lines in the title, so it'd be very convenient for us if that was supported.
Thank you for taking a look at this.
Yes, I understand your needs and your point. Unfortunately LegendBox wasn't designed for that. I will include it into requested features list.
Annotation could be tied to Axis value as well as to screen coordinates. For example,
Code: Select all
annot.LocationCoordinateSystem = CoordinateSystem.ScreenCoordinates;
Don't forget to allow annotation drawing on margins with Annotation.ClipInsideGraph = false.
Another alternative is to use multiple LegendBoxes (in XY only). However, to avoid overlap, you would need to do some calculation anyway. After Chart (LegendBox) is rendered you could read location with
Code: Select all
Hope this helps.