How to get and set position for NRectangularCallout


Author
Message
joern kunze
joern kunze
Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)
Group: Forum Members
Posts: 86, Visits: 221
Hi Experts,
I have added a NRectangularCallout to a chart () which can be moved with the mouse - so far it works well:
NRectangularCallout m_RectangularCallout = new NRectangularCallout();
m_RectangularCallout.ArrowLength = new NLength(10, NRelativeUnit.ParentPercentage);
m_RectangularCallout.StrokeStyle.Width = new NLength(1);
     m_RectangularCallout.UseAutomaticSize = true;
      m_RectangularCallout.Orientation = iLabelPos;         // 348;   //8;
      m_RectangularCallout.Text = oLine.m_sLabel;
     _NevronChart.Panels.Add(m_RectangularCallout);

      // Anchor the callout to data point
      NDataPointAnchor anchor = new NDataPointAnchor(line, 1, ContentAlignment.MiddleCenter, StringAlignment.Center);
      m_RectangularCallout.Anchor = anchor;

      m_RectangularCallout.AlwaysInsideParent = true; 

The callout can be moved with the mouse (e.g. to drag it to a different location because it hides some important chart data).
Now I want to store the new position of the callout after the user has dragged it and restore the position of the callout when the data is loaded from external file.
So how can I:
1. Get the position of the callout after it has been dragged by mouse (and may be the callout orientation as well) ?
2. Restore the callout position after it has been created ?

Thanks for your help,
Best regards,
Joern

Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.1K
Hi Joern,
The callout drag tool modifies the callout Orientation and ArrowLength properties, so in order to restore the callout to its original position, you need to restore those two properties to their original values. Similarly, if you want to reposition a callout to the position that the user previously specified you need to alter two properties. Let us know if you meet any problems.

Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic
1 active, 1 guest, 0 members, 0 anonymous
No members currently viewing this topic!

Login

Explore
Messages
Mentions
Search