Chart Connect Points Drawing Shapes Peltier

doriangrey

Board Regular
Joined
Jan 18, 2012
Messages
57
Excel Vba Shapes to Connect Points Charts and make Drawing Clone of Complex Chart XY with Lines


Hi, Partners,
I using Jhon Peltier code to draw in charts,


I want connect the point of chart XY to create a shape clone of chart of 2 ways, 1solid line shape and 1Outline Shape.


the code works with more simplex charts but no with my complex chart.
i need change your "Dim as Integer" to "Dim as Long" to works with more simplex.


i need change the location of "Next" before "ConverToShape" to final of code to avoid the problem of shape close before a correct moment.


https://groups.google.com/forum/#!searchin/microsoft.public.excel.charting/nodes$20points%7Csort:relevance/microsoft.public.excel.charting/AgWMOIKU4Do/w1JYa3PIt5kJ


the chart (XY Scatter dots only) have 1series with very number of points with contiguous and non-contiguous points complex design.


Excel 2013 32bit Original - Win7.


please work with my sample file logo if possible.

https://mega.nz/#!RxRV0QSR!uHzNTAOIbzJqyN3igXlGxxbSxlKrR2xV1XlQ_h2IxVk

Code:
[COLOR=#333333][FONT=source_sans_proregular]https://mega.nz/#!RxRV0QSR!uHzNTAOIbzJqyN3igXlGxxbSxlKrR2xV1XlQ_h2IxVk
[/FONT][/COLOR]


thank you very mutch.
DorianGrey

 
Your routine is not generating vertices (nodes), it is generating pixels. See this chart:

te8cVsi.png


To draw a shape you need to find the vertices, then connect them together to make a shape.

Your data has pixels. They fall within the shape, but they do not fall on the boundary that defines the shape. You can guess by eye where the vertices are if you have the pixels. That's what I did with my simple examples several posts ago. But there is no way to determine which of your pixels might make a good vertex, because none of the pixels (or a rare few if you're lucky) coincide with vertices.

Trying to delete points from the chart won't help, because you will still be left with pixels, just not as many of them. You won't have vertices that you can turn into nodes of a shape. And no amount of playing with nodes in the shape will turn the pixels into nodes, because the pixels are in the wrong place.
 
Upvote 0

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Jhon, I'll think about it with more time, I can not understand everything you said applied to practice, now.


You can tell me how I get the coordinates of the Points that appear on the chart in this ScreenShot ??? (when I select the whole series they appear !!!) ???


Realize that I want the Points that are shining in the image, are much less than the whole series.


These points could already help me get started.
A part of the work I can do in an automated way, and the other part do in a manual way like you did.

thanks!
 
Last edited:
Upvote 0
Jhon, I'll think about it with more time, I can not understand everything you said applied to practice, now.


You can tell me how I get the coordinates of the Shining Points that appear on the chart in this ScreenShot ??? (when I select the whole series they appear !!!) ???


Realize that I want the Points that are shining in the image, are much less than the whole series.


These points could already help me get started.
A part of the work I can do in an automated way, and the other part do in a manual way like you did.

EDITED:
I want get the extreme and external points of chart, not the internal points, only the first point of "external Line".

thanks!

"https://s-media-cache-ak0.pinimg.com/originals/9c/8a/65/9c8a65552b0e344164d5a7b30ff25e36.png"
9c8a65552b0e344164d5a7b30ff25e36.png


This chart below is the same chart as above
In this ScreenShot i am show the details of multiple PointNodes of "Line contour" of chart.
How can i get the extreme and external points of the "line", not the internal points, only the first point of "external Line" ???
You can tell me how I get the coordinates of the shining Points that appear on the chart in this ScreenShot ???

"
https://s-media-cache-ak0.pinimg.com/originals/a7/12/6c/a7126cb53007e84ebd16a38dd85b88e6.png"
a7126cb53007e84ebd16a38dd85b88e6.png
 
Last edited:
Upvote 0
Hi, partners,

i want too, vba routine to Rearrange the coordinates, and delete the surplus and unnecessary points automatically.

the "lines" are contiguos, pointNodes are queued, makes "contiguous lines of queued points" i need only the first "the external line of queued points", "extreme points more closer to the borders of the chart.

the coordinates of the shining Points that appear on the chart in this ScreenShot are good start.

not problem not perfect, i not need perfection, not technical drawing, not technical chart.

thanks!
 
Last edited:
Upvote 0
When a series has a small number of points, if you select the series, all of the points are highlighted. When a series has a large number of points, to avoid clutter, Excel only highlights a fraction of the points when the series is selected. I've never bothered to figure out which points are highlighted, and a quick look at your screenshot indicates that there is nothing special about these points. They are simply a subset of the pixels which happen to be highlighted, and having these points is really no closer to having the vertices that you need.
 
Upvote 0
I understand you, but I think a little different.


These highlighted points indicate regions of the image, regions of the chart, as if they were separate series, that I could work separately.


I would have a point of departure in each region to guide me, to have the vba routine started and to be guided by that point.


I might be able to use "Nodes.Parent" to traverse the neighboring points to a point away or before arriving in the white region without points.


Is there a way to do "MergePoints"?
Is there a way to do "Merge All Contiguous Points"?
Could I merge the queued points into a single one directly into the chart or cells?


Is there any solution to my problem?


You already suggested to me to delete some coordinates of the cells, some things, but then you told me that my rasterization method will not work, I'm confused.


I just want to reproduce the raster drawing in lines on a chart and then convert to Autoshapes.

I have some ideas that I will test and I made some progress that I will show you in the next few days after I finish.
I think if i change the color of some points per region of chart (contiguous points ) can help without needing to create in the series or to rescan by separate pieces the image.

thanks!
 
Last edited:
Upvote 0
I think if i only plot or scan the 2intial and 2final points of each "regions of row of raster image" or "regions of ploted drawing chart" i eliminate almost all unnecessary points.

i think i need in start a vba routine to select an change the color of each "region of contiguous pixels" of drawing of chart.
after, delete the unnecessary points too.

With few good points on the chart would make it easier for me to manually correct the coordinates of these points.
i think find by vba routine the "points that are highlighted" is the good start.
 
Last edited:
Upvote 0
Hi, Jhon,

i will change, yes i will change my approach to look for nodes/vertices instead of pixels, but in next step, in future specific thread.

at this moment i want discover how I can find some reference point in this chart, like quadrants.

i think It is possible that it are the automatic highlight points are like quadrants reference of Excel Chart Engine.

I can not do things quickly, I'm doing tests, but I'm discovering many things I did not know about charts.

I will put new results soon, and when I exhaust the possibilities I will try a new approach.

discover about the automatic highlight points of Excel chart engine is a good start i need.
discover about split the serie to other series to each "quadrant of points" using with reference the highlight points is other good start i need.

Cheers.
 
Upvote 0
Hi, Jon Peltier and Partners !

I succeeded in creating algorithm to delete the points in excess.
I also successfully tried to reorder the points and draw some outline lines of the chart.


I am now still working hard on improving the first algorithm to delete the points to leave the points more aligned and then go back to the other algorithms that will reorder the points and then the lines will be drawn.


So far the vba routines are reasonably simple and short.
I know this will work for this drawing and maybe for other simple drawings and maybe it will not work for a very complex image.

When I get better results I'll show up here in the next few days.
cheers !

results of algorithm to delete the points
3891fb9dabcd883a6c7a59e2b67412e7.png
 
Upvote 0

Forum statistics

Threads
1,213,531
Messages
6,114,172
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top