Subject: Excel Chartshape height and datapoints
Date: 2018-05-17 17:46:41
From: fpease
Source: excel-chartshape-height-datapoints
----------------------------------------------------------------------

I recently downloaded a trial version, as we're trying to programmatically duplicate an example Excel file.

It contains a chart within the middle of a page of a specific height/width combo, and has data labels of **Value From Cells** of column A.

I created a *ChartShape* object, and while the top and left parameters work, I cannot seem to change it's width nor height.  I've tried chart.Width as well as chart.ChartObject.Width.

The second issue is with the data labels.  I can't seem to find where these are created other than looping through the series.DataPoints collection and directly changing the DataLabels.Text parameter, manually figuring out what the text should be, vs what you'd do in Excel with just selecting and filling in **Value From Cells**.  The other issue here is that it though I imported data via *ImportArray*, the *DataPoints* collection says it has zero items, so I have to loop through the data array I imported to add to non existing *DataPoints*, rather than just looping through a list of *DataPoints*.  I was wondering what the correct way to go about doing this would be.

----------------------------------------------------------------------

Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand
If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor
who sold you the license and ask for your money back.

Back to ComponentPro Q&A Forum Index