Profile Picture

Annotation label range

Posted By Ricardo Sousa 14 Years Ago
Author
Message
Ricardo Sousa
Posted 14 Years Ago
View Quick Profile
Junior Member

Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 10, Visits: 1
Hi,

I'm trying to use annotations to write some labels between some points, meaning, I want to make a chart like the attach image.

All the text refers to the line series, [x0,y0 - x1,y1].


With the annotations it didn't went well, because I needed a range anchor annotation.

Other approach, was to use data labels in Float Bar Series, but there is no way to clip the labels.

Can you please advise.


Thanks for any ideas,
Ricardo

Attachments
linelabel.bmp (45 views, 444.00 KB)
Nevron Support
Posted 14 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: Last Week
Posts: 3,054, Visits: 4,009

Hi Ricardo,

You can try to use custom painting - All Examples\Custom Painting - as it allows you to have full control over the text angle and position. You can use the NScale2DToViewTransformation object to transform scale coordinate to view coordinates - for example:

NScale2DToViewTransformation transform = new NScale2DToViewTransformation(nChartControl1.View.Context, chart, (int)StandardAxis.PrimaryX, (int)StandardAxis.PrimaryY);

NPointF start = new NPointF();
NPointF end = new NPointF();

transform.Transform(new NVector2DD(x0, y0), ref start);
transform.Transform(new NVector2DD(x1, y1), ref end);

will return the start and end points of a line segment defined by [x0, y0] - [x1, y1] in view coordinates, which you can use to draw custom annotations.

Hope this helps - let us know if you meet any problems.

 



Best Regards,
Nevron Support Team



Ricardo Sousa
Posted 14 Years Ago
View Quick Profile
Junior Member

Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 10, Visits: 1
Thanks,

I will try that.





Similar Topics


Reading This Topic