Profile Picture

How to get and set position for NRectangularCallout

Posted By joern kunze 5 Years Ago
Author
Message
joern kunze
Question Posted 5 Years Ago
View Quick Profile
Junior Member

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
Last Active: 3 Months Ago
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
Posted 5 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 hours ago
Posts: 3,054, Visits: 4,009
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





Similar Topics


Reading This Topic