Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there anyway to display image in a graph?

When we worked with LabWindows (and VC6.0), we used to display images in graph, which is very helpful.
 
Right now, we start using Visual Studio .Net. But I could not find a way to display image in a Measurement Studio graph, either ActiveX control or .Net control.
 
Is there anyway to display image in a graph?
 
Thanks
0 Kudos
Message 1 of 12
(5,096 Views)

Sure.  Look at BackgroundImage and PlotAreaImage.  PlotAreaImage displays an image only on the plot area.

 

Scott

0 Kudos
Message 2 of 12
(5,085 Views)
Thank you for your reply. But PlotAreaImage is only one image, right? What we are looking for is to plot a couple of images like general plot objects in a graph. Is this doable?
0 Kudos
Message 3 of 12
(5,083 Views)

Hey Eeway,

Did you have multiple images on the same graph before?  If so how did you do it then.  Because the CWGraph is just and activeX control just like it was pre- .NET.

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 12
(5,075 Views)

Hi, Sam,

I used LabWindows before. There is a function called "PlotRectangle" which can be used to plot images.

 

0 Kudos
Message 5 of 12
(5,070 Views)
Couldn't you just use the PictureBox from the Windows Forms toolbox?  You could dynamically create these as well if that is a concern.
jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 6 of 12
(5,059 Views)
Hi, Sam,
 
Yes, using picture box is right now considered. But it is totally different story. When user zooms and pans the graph, picture box is not automatically moved and zoomed. So I must hanle zoom and pan events to implement that.
 
 
0 Kudos
Message 7 of 12
(5,056 Views)
Currently it is limited to 1 image. 
jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 8 of 12
(5,045 Views)

You should be able to use XYRangeAnnotation in the .NET graphs to get the behavior you want. You can use the designer to create and configure the annotations. Programmatically, you can use FillStyle.FromImage() to set the XYRangeAnnotation.RangeFillStyle property to the image of your choice. For example,

xyRangeAnnotation1.RangeFillStyle = FillStyle.FromImage(imageList1.Images[0], ImageAlignment.Stretch);

The graph automatically handles zooming, panning, etc. of annotations.

The attached .zip file contains a Visual Studio 2003 project that shows how this is done. The project uses Measurement Studio 8.0.1. If you have an earlier version of Measurement Studio, you will need to re-add the references to the Measurement Studio libraries and (possibly) refresh the license files.

Message Edited by drohacek on 05-26-2006 04:46 PM

0 Kudos
Message 9 of 12
(5,041 Views)
Thanks a lot, drohacek. I will try.
0 Kudos
Message 10 of 12
(5,034 Views)