Jump to content
Software FX Community

GDI


User (Legacy)

Recommended Posts

You have two choices.

a) You can use the annotation extension, it allows you to add

lines,text,rectangle,arrows,etc. These objects can be attached to a logical

XY position so you do not have to figure out where to paint them if they are

related to a value in your chart.

B) Handle the PrePaint/PostPaint events. These events will give you a

graphics object so that you can paint anything you want, you can use the

Axis.ValueToPixel if you need to calculate the pixel position for a specific

value.

--

Regards,

JC

Software FX Support

"Matt McBride" <matthew.mcbride@tfn.com> wrote in message

news:nXAvBPFWDHA.2896@WEBSERVER1...

> Is there a way to construct a chart but before rendering... get a handle

on

> the chart object and include additional lines,text etc... through GDI?

>

>

Link to comment
Share on other sites

Do you have any code samples... thus far the function I'm using to catch the

Pre-render event is never being called???

"SoftwareFX Support" <support@softwarefx.com> wrote in message

news:4rVR4lFWDHA.1484@WEBSERVER1...

> You have two choices.

>

> a) You can use the annotation extension, it allows you to add

> lines,text,rectangle,arrows,etc. These objects can be attached to a

logical

> XY position so you do not have to figure out where to paint them if they

are

> related to a value in your chart.

>

> B) Handle the PrePaint/PostPaint events. These events will give you a

> graphics object so that you can paint anything you want, you can use the

> Axis.ValueToPixel if you need to calculate the pixel position for a

specific

> value.

>

> --

> Regards,

>

> JC

> Software FX Support

> "Matt McBride" <matthew.mcbride@tfn.com> wrote in message

> news:nXAvBPFWDHA.2896@WEBSERVER1...

> > Is there a way to construct a chart but before rendering... get a handle

> on

> > the chart object and include additional lines,text etc... through GDI?

> >

> >

>

>

Link to comment
Share on other sites

The following worked correctly for me:

1) Hook the PostPaint event at design-time.

2) Write the code for it.

The code looks something like this:

// Code gene\rated by Visual Studio

this.Chart1.PostPaint += new

SoftwareFX.ChartFX.Internet.Server.WHEventHandler(this.Chart1_PostPaint);

private void Chart1_PostPaint(object sender,

SoftwareFX.ChartFX.Internet.Server.WHEventArgs e) {

e.Graphics.FillRectangle(Brushes.Red,0,0,100,100); // Code added by me

}

--

FP

Software FX, Inc.

Link to comment
Share on other sites

Got it working.. thanks

"Matt McBride" <matthew.mcbride@tfn.com> wrote in message

news:FHk29YqWDHA.1496@WEBSERVER1...

> Do you have any code samples... thus far the function I'm using to catch

the

> Pre-render event is never being called???

>

>

> "SoftwareFX Support" <support@softwarefx.com> wrote in message

> news:4rVR4lFWDHA.1484@WEBSERVER1...

> > You have two choices.

> >

> > a) You can use the annotation extension, it allows you to add

> > lines,text,rectangle,arrows,etc. These objects can be attached to a

> logical

> > XY position so you do not have to figure out where to paint them if they

> are

> > related to a value in your chart.

> >

> > B) Handle the PrePaint/PostPaint events. These events will give you a

> > graphics object so that you can paint anything you want, you can use the

> > Axis.ValueToPixel if you need to calculate the pixel position for a

> specific

> > value.

> >

> > --

> > Regards,

> >

> > JC

> > Software FX Support

> > "Matt McBride" <matthew.mcbride@tfn.com> wrote in message

> > news:nXAvBPFWDHA.2896@WEBSERVER1...

> > > Is there a way to construct a chart but before rendering... get a

handle

> > on

> > > the chart object and include additional lines,text etc... through GDI?

> > >

> > >

> >

> >

>

>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...