User (Legacy) Posted August 6, 2003 Report Posted August 6, 2003 Is there a way to get the x y coordinate of an element within the image and also the height and width of said element. Element meaning a bar and where is it in the image and exactly what real estate does it occupy.
Software FX Posted August 6, 2003 Report Posted August 6, 2003 The MarkerToPixel method in the chart object as well as the ValueToPixel method in the axis object allow you to retrieve these coordinates. If you explain a little what do you need these coordinates for maybe I can give you some advice on how to user these methods. -- FP Software FX, Inc.
User (Legacy) Posted August 7, 2003 Author Report Posted August 7, 2003 Some of our Dev groups want control of the charts beyond the typical usage of the interface. I noticed that chart and axis have methods to indicate where they are in the image but I dont' see that other elements like point 1 of series 2 have the same info available. An example... to be able use a custom gradient scheme that is painted by GDI in a bar. You could handle the PostPaint event but in order to fill the bar correctly you would need to know it's x-y position and height/width. "SoftwareFX Support" <support@softwarefx.com> wrote in message news:fO2OIQGXDHA.2332@WEBSERVER1... > The MarkerToPixel method in the chart object as well as the ValueToPixel > method in the axis object allow you to retrieve these coordinates. If you > explain a little what do you need these coordinates for maybe I can give you > some advice on how to user these methods. > > -- > FP > Software FX, Inc. > >
Software FX Posted August 7, 2003 Report Posted August 7, 2003 That level of detail is not available. However it can be calculated. Every gallery type is different a and other settings such as 3D also affect the shape and positioning of the "markers". Specifically for 2D bar charts (side-by-side), you can use the MarkerToPixel method to retrieve the position of the center of the bar. To obtain the width of the bar, you can use: width = ((AxisX.ValueToPixel(indexofbar-1) - AxisX.ValueToPixel(indexofbar))*chart.Volume/100.0) / numberofseries -- FP Software FX, Inc.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.