User (Legacy) Posted February 1, 2005 Report Share Posted February 1, 2005 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 More sharing options...
Software FX Posted February 1, 2005 Report Share Posted February 1, 2005 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 More sharing options...
User (Legacy) Posted February 1, 2005 Author Report Share Posted February 1, 2005 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 More sharing options...
Software FX Posted February 1, 2005 Report Share Posted February 1, 2005 To convert a DateTime to a double do: double value = dateTime.ToOADate(); -- FP Software FX Link to comment Share on other sites More sharing options...
User (Legacy) Posted February 2, 2005 Author Report Share Posted February 2, 2005 thanks! "SoftwareFX Support" <noreply@softwarefx.com> skrev i meddelandet news:cQOYbhKCFHA.2488@webserver3.softwarefx.com... > To convert a DateTime to a double do: > > double value = dateTime.ToOADate(); > > -- > FP > Software FX > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.