Profile Picture

model point annotation

Posted By Filip Mergental 12 Years Ago
Author
Message
Filip Mergental
Posted 12 Years Ago
View Quick Profile
Junior Member

Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)Junior Member (16 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 16, Visits: 1
Hello,
I would like to ask:
- Is correctly written code for placing the annotation in the chart? (it seems to me that y coordinates are not displayed correctly and when I'm zooming the chart, the annottation is on the other place)
- Is it possible to move (drag and drop) the annotation in the chart?


My code to draw the anntotation with "text" on the coordinates x,y

private void DrawNote(NCartesianChart chart, NXYScatterSeries series, float x, float y, string text)
{
NRoundedRectangularCallout note = new NRoundedRectangularCallout();

NVector3DF vecModelPoint = new NVector3DF();
NAxis xAxis = chart.Axis(StandardAxis.PrimaryX);
NAxis yAxis = chart.Axis(series.VerticalAxes[0]);

vecModelPoint.X = xAxis.TransformScaleToModel(true, x);
vecModelPoint.Y = yAxis.TransformScaleToModel(true, y);
vecModelPoint.Z = 0;

note.FillStyle = new NColorFillStyle(Color.DeepPink);
note.UseAutomaticSize = true;
note.TextStyle.FontStyle = new NFontStyle(_doc.SeriesNoteFont.Name, _doc.SeriesNoteFont.Size, _doc.SeriesNoteFont.Style);
note.Visible = true;
note.Anchor = new NModelPointAnchor(chart, vecModelPoint);

note.Orientation = 120;
note.Text = text;

if (text != "")
nChartControl.Panels.Add(note);

}

Thank you,

Daniela




Similar Topics


Reading This Topic