Profile Picture

Lines data labels overlapping

Posted By Rinat Talibullin 13 Years Ago
Author
Message
Rinat Talibullin
Posted 13 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 9, Visits: 1
Hello!

I have some problems with label layout.
I use labellayout like this:

line.LabelLayout.UseLabelLocations = true;
line.LabelLayout.OutOfBoundsLocationMode = OutOfBoundsLocationMode.PushWithinBounds;
line.LabelLayout.InvertLocationsIfIgnored = true;

chart.LabelLayout.EnableInitialPositioning = true;
chart.LabelLayout.RemoveOverlappedLabels = true;
chart.LabelLayout.EnableLabelAdjustment = true;

line.LabelLayout.EnableDataPointSafeguard = true;
line.LabelLayout.DataPointSafeguardSize = new NSizeL(
new NLength(3f, NRelativeUnit.ParentPercentage),
new NLength(3f, NRelativeUnit.ParentPercentage));

Result you can see on chart1.jpg. Overlapping labels aren't removed actually. But if I use zoom I can get chart2.jpg example. It's better, but it has some problems on different zoom locations - for example data labels can be absent at all, or they can look like on chart1.jpg. How can I get proper data labels layout?

Actually functionality I need is like in chart3.jpg. I want to point with cursor on any place of chart and get values under cursor. Cursor can be pointed on line or point or empty space. It doesn't really matther whether it will be like tooltip or I get values programmatically. But I guess there is no such functionality in nevron charts. Can you give me advise how can I get something like this?

Sorry for my poor english. If you don't undestand something, I'll try to explain it in another way. Thank you!

Attachments
chart1.png (118 views, 250.00 KB)
chart2.png (124 views, 172.00 KB)
chart3.png (144 views, 43.00 KB)
Nevron Support
Posted 13 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: 2 days ago @ 1:54 AM
Posts: 3,054, Visits: 4,009
Hello Rinat,

The automatic label layout is a computationally expensive task and becomes slow when there are too many layout items (labels and obstacles). If the number of layout items exceeds the value of the MaxLayoutItems property, the chart does not perform the automatic layout. Please take a look at the chart.LabelLayout.MaxLayoutItems property and try to increase its value (the default is 500).

As far as we understand you actually need some sort of tooltip functionality. This is probably a better approach, because the chart will be unreadable with so many labels (even if the label layout is performed). You can take a look at the following example regarding tooltips:

All Examples > Interactivity > Tools > Tooltip and Cursor Tool

Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic