reshape chart

WoodyHays

Board Regular
Joined
May 14, 2002
Messages
185
Is there any way to bend a chart into a pallallelagam that can be manipllated like one dragged from the drawing toolbar?

I am trying to build a cube out of 3 charts, which requires that they not be square. I have tried all the 3D rotaing, but can't come up with anything.

Thanks,
Woody Hays
 

Some videos you may like

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

mjbeam

Well-known Member
Joined
Apr 6, 2002
Messages
756
Is this a one time thing or are you are you going to need to be able to update the charts on the cube?

-Mike
 

WoodyHays

Board Regular
Joined
May 14, 2002
Messages
185
Thanks Mike,

It will need to be updated on a regular basis.

I have tried everything I can think of and have come up empty. Surely there is a way to do this.

Maybe with code I could copy an updateable chart as an image into the distoted shape to make a cube that isn't updated in real time, but is updateable when the code is executed.

Any thoughts are appreciated,

Thanks,
Woody Hays
 

mjbeam

Well-known Member
Joined
Apr 6, 2002
Messages
756
Well, charts can be saved as GIF files using the Export statement. Once you do that you may be able to find some third party controls that can skew the image for you. VBNET has this ability so if you have it you could create your own DLL or OCX to handle it.

You could also skew the image yourself in VBA but you would have to access the GIF file in binary mode, and write the results back out to another graphic file.

Once you have the image skewed you can use it as a texture on the parallelogram shape.. Put three of those together to make a cube and there you go.

There are some pretty talented people on this site. One of them might have some better tips for you. It sounds like it would be interesting to work on but I don't have that kind of time right now.

Good luck!


-Mike
 

WoodyHays

Board Regular
Joined
May 14, 2002
Messages
185

ADVERTISEMENT

Thanks,
inserting a picture into the parallagram worked perfectly!

I need to write something to save the plot area as a GIF or JPG file then I can make it work.

It doesn't sound like this will be so hard after all.
Thanks,
Woody Hays
 

tusharm

MrExcel MVP
Joined
May 28, 2002
Messages
11,028
Depending on what you intend to do with the result, you may not need to go through the export+select picture for fill business. Just format the chart so that its plotarea and chartarea have no area or border. Then, position the chart over the parallelogram and group the two into a single object.

The other benefit of this approach is that if the data used for the chart change, XL will still update the chart.
WoodyHays said:
Thanks,
inserting a picture into the parallagram worked perfectly!

I need to write something to save the plot area as a GIF or JPG file then I can make it work.

It doesn't sound like this will be so hard after all.
Thanks,
Woody Hays
 

WoodyHays

Board Regular
Joined
May 14, 2002
Messages
185

ADVERTISEMENT

Great idea, but I couldn't get it to work correctly because parts of the graph were outside the edges of the parallegram, since the chart was square. I could shrink it so that it was all within the shape, but it didn't look right since it was so much smaller.

Thanks.
Woody Hays
 

tusharm

MrExcel MVP
Joined
May 28, 2002
Messages
11,028
When you use an image as the fill for an object, XL anyway shrinks the image to fit (or optionally, it truncates the image). So, whether you do the shrinking/truncating or have XL do it, the final visual effect would be the same.
WoodyHays said:
Great idea, but I couldn't get it to work correctly because parts of the graph were outside the edges of the parallegram, since the chart was square. I could shrink it so that it was all within the shape, but it didn't look right since it was so much smaller.

Thanks.
Woody Hays
 

mjbeam

Well-known Member
Joined
Apr 6, 2002
Messages
756
Here is some code from one of my projects that exports a graph:

Code:
Set currentchart = Sheets("What If Chart").ChartObjects("Chart 11").Chart
currentchart.Export Filename:="C:\CWTemp.GIF", filtername:="GIF"

and to add a picture to an object as the fill pattern:

Code:
Selection.ShapeRange.Fill.UserPicture _
        "C:\CWTemp.GIF"


-Mike
 

Watch MrExcel Video

Forum statistics

Threads
1,128,167
Messages
5,629,079
Members
416,364
Latest member
maatpsr

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
Top