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
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
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
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,213,490
Messages
6,113,957
Members
448,535
Latest member
alrossman

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