Jump to content
Software FX Community

Insert of annotation fails after painting a graph


User (Legacy)

Recommended Posts

I try to insert a simple annotation on the same place on a graph. If I 

insert it before I paint a graph it will be painted. If I try to insert it

after nothing happens. Also, worth noticing is that the annotation

disappears if paint the graph (after inserting before painting).

Here is the code for adding:

SoftwareFX.ChartFX.Annotation.AnnotationX annot = new

SoftwareFX.ChartFX.Annotation.AnnotationX();

SoftwareFX.ChartFX.Annotation.AnnotationBalloon balloon = new

SoftwareFX.ChartFX.Annotation.AnnotationBalloon() ;

annot.List.Add(balloon);

ChartInfo.ThisChart.Extensions.Add(annot);

// Configure the balloon object

balloon.Text =" Nyhet";

balloon.Attach(System.Drawing.StringAlignment.Near,2,System.Drawing.StringAlignment.Far,62);

balloon.TailCorner = 2;

balloon.ArrowFactor = 10;

balloon.Border.Color= System.Drawing.Color.Black ;

balloon.Color = System.Drawing.Color.Gold;

balloon.SizeToFit();

balloon.Refresh();

Link to comment
Share on other sites

We are unable to reproduce this problem.

Can you please explain where is each piece of code ? I tried putting the

creation piece in a button and then the balloon configuration in another

button, press the two buttons in order and got the balloon showing. The

chart was visible by the time I pressed the buttons. I also tried putting

both pieces of code in the same button. It also worked.

Did you check that the scale in the chart is consistent with the Attach call

? You are placing your object at 2,62. Is the range in your X and Y-Axes

consistent with these settings ?

--

FP

Software FX

Link to comment
Share on other sites

OK, I thought it was normal X, and Y variables. If you look at the graph you 

see my problem. I have double values on the Y-axis and Time-values on the

x-axis:

ThisChart.AxisX.LabelsFormat.Format =

SoftwareFX.ChartFX.AxisFormat.DateTime;

ThisChart.AxisX.LabelsFormat.CustomFormat = "HH:mm";

If you look at the graph, how do I write to attach a balloon at 14:00, value

20.70? The funtion only takes double values??

thanks / Henrik

"SoftwareFX Support" <noreply@softwarefx.com> skrev i meddelandet

news:KbHfV1HCFHA.2536@webserver3.softwarefx.com...

> We are unable to reproduce this problem.

>

> Can you please explain where is each piece of code ? I tried putting the

> creation piece in a button and then the balloon configuration in another

> button, press the two buttons in order and got the balloon showing. The

> chart was visible by the time I pressed the buttons. I also tried putting

> both pieces of code in the same button. It also worked.

>

> Did you check that the scale in the chart is consistent with the Attach

> call

> ? You are placing your object at 2,62. Is the range in your X and Y-Axes

> consistent with these settings ?

>

>

>

> --

> FP

> Software FX

>

>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...