Thread: ChartWizard
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.charting
soup soup is offline
external usenet poster
 
Posts: 3
Default ChartWizard

Here is the problem and a workaround
Problem - This will compile but it will not execute
chart.ChartWizard(var, // Source.
COleVariant((short)89), // Gallery: 3d Column.
covOptional, // Format, use default.
COleVariant((short)2), // PlotBy: xlRows.
COleVariant((short)0), // CategoryLabels.
COleVariant((short)1), // SeriesLabels.
COleVariant((short)FALSE), // HasLegend.
COleVariant("Stock History"), // Title.
COleVariant("Date"), // CategoryTitle.
COleVariant("Price"), // ValueTitles.
covOptional // ExtraTitle.
);
Solution: // set it then change it to what you want.
chart.ChartWizard(var, // Source.
COleVariant((short)11), // Gallery: 3d Column.
covOptional, // Format, use default.
COleVariant((short)2), // PlotBy: xlRows.
COleVariant((short)0), // CategoryLabels.
COleVariant((short)1), // SeriesLabels.
COleVariant((short)FALSE), // HasLegend.
COleVariant("Stock History"), // Title.
COleVariant("Date"), // CategoryTitle.
COleVariant("Price"), // ValueTitles.
covOptional // ExtraTitle.
);
chart.SetChartType(89);
chart.SetPlotBy(2);

I hope this works for you.
-Soup-





"Soup" wrote:

The easy answer to your question is:
http://msdn2.microsoft.com/en-us/lib...ffice.11).aspx

In playing with ChartWizard I have run into a problem that Gallery can only
accept the values 1-15. Other values seem to create an error. I have not yet
found a .h file to include with these definitions.

I hope this helps
-Soup-


"Gabi" wrote:

hi all ,
im programming in mfc.
and i want to know, in ChartWizard method what are all the possibble fields
for :

1. Gallery
2. PlotBy xlColumns
if someone can guide me to some theory ill appriciate it.

ChartWizard(var, // Source.
COleVariant((short)-4100), // Gallery = xy.
COleVariant((short)6), // Format, use default.
COleVariant((short)2), // PlotBy xlColumns.
COleVariant((short)1), // CategoryLabels.
COleVariant((short)1), // SeriesLabels.
covTF, // HasLegend.
COleVariant("Title"), // Title.
COleVariant("Frequency"), // CategoryTitle.
COleVariant("Whatever"), // ValueTitles.
covOptional // ExtraTitle.
);