|line and points in xychart||fernando cinquegrani||3/1/02 2:07 AM|
|line and points in xychart||fernando cinquegrani||3/1/02 5:02 AM|
"fernando cinquegrani" <f.cinq...@libero.it> ha scritto nel messaggio
now i do this in connecting centers of
|line and points in xychart||Tushar Mehta||3/4/02 3:22 PM|
[This followup was posted to microsoft.public.excel.charting with an
email copy to fernando cinquegrani.
Please use the newsgroup for further discussion.]
I would suggest that you not use shapes to connect data points on a
|line and points in xychart||fernando cinquegrani||3/5/02 12:34 AM|
i would fill the polygon defined by lines.
please, see cluster.exe or scatter.exe
in my excel page (hhtp://www.prodomosua.it/ppage02.html).
i select a range of datapoints, then compute
the convex hull (in italian: inviluppo convesso), then create
a new dataseries with lines. how can i fill this polygon?
|line and points in xychart||Tushar Mehta||3/5/02 6:42 AM|
I couldn't tell from the examples on the web page what exactly you want
to do. And, its been some time since I had to worry about constructing
a convex hull. So, if what you want to do is create an object that
closes on itself, just plot the first data point once more as the last
data point. This would have to be in a XY Scatter chart. For example,
to create a rectangle, plot (x1,y1), (x1,y2), (x2, y2), (x2, y1), and
In <1l%g8.4319$uN5.1...@twister1.libero.it>, fernando cinquegrani
|line and points in xychart||fernando cinquegrani||3/5/02 11:45 AM|
Thanks for your interest, but...
in my examples i create a new close polygon
(the convex hull) yet.
i want to fill this with a colour.
i think i have to draw the polygon as a shape.
i now draw this polygon as shape (not in examples),
and i fill it with a colour.
but for find the nodes of my polygon, i need the
position in chart of each point.
which is the position (left, top) of a generic point in a xychart?
the statement dataseries(a).points(b).left=...doesn't exist.
now i use the datalabel (not visible) center of this point.
this process is very slow and it is impossible to
update the chart in real time if i change the data.
(excuse me, but i dont speak english)
|line and points in xychart||Jon Peltier||3/5/02 11:55 AM|
No problem, I think I know what you want. To just draw a closed shape, you
Since you want to fill in the shape with some other color, however, you really
This works for an XY Scatter chart (I assume it will crap out for a line
''' START THE CODE ---------------------------------------
Set myCht = ActiveChart
Set mySrs = myCht.SeriesCollection(1)
Xnode = Xleft + mySrs.XValues(Npts) * Xwidth / (Xmax - Xmin)
Set myBuilder = myCht.Shapes.BuildFreeform(msoEditingAuto, Xnode, Ynode)
|line and points in xychart||fernando cinquegrani||3/5/02 4:21 PM|
|line and points in xychart||fernando cinquegrani||3/5/02 5:41 PM|
Xnode = Xleft + (mySrs.XValues(Ipts) <<< - Xmin >>>) * Xwidth / (Xmax -
because the scale doesn't start by zero (MinimumScale).
|line and points in xychart||Jon Peltier||3/5/02 7:16 PM|
|line and points in xychart||fernando cinquegrani||3/9/02 6:03 AM|
Set myShape = myBuilder.ConvertToShape
is frequently in error when the
chart is very little (points quite near).
do you know why?
how can i obviate?
1. the addin cluster.xla, where i use your suggestion, is on line
2. for a best performance of your code, define
Dim Xnode as Single, ...
"Jon Peltier" <jonpe...@yahoo.com> ha scritto nel messaggionews:uErS$0LxBHA.1644@tkmsftngp07...
|line and points in xychart||Jon Peltier||3/12/02 2:35 PM|
When you draw a shape manually, if you make a point very close to another