aspose-cells 8.6.2.6
- create whatever chart in Excel and save
- load this file with aspose
chart.getPlotArea().getX() = 0
chart.getPlotArea().getY() = 0
chart.getPlotArea().getWidth() = 0
chart.getPlotArea().getHeight() = 0
The plot area seems not filled with its values.
Hi,
It works, thanks.
Wouldn’t it be good to have those values directly, without calling calculate (at least if no modification has been done to the chart since the loading) ?
Hi,
What is the factor between chart height and inside heights (title, plotArea, legend) ?
On a bar chart, I retrieve values that do not match :
chart H: 242
title Y: 165
title H: 579
plot Y: 760
plot H: 2298
legend Y: 3455
legend H: 380
Hi Sébastien,
- The chart area of the chart.
- The plot area of the chart.
- The data points of the data series that are plotted in the chart.
- The horizontal (category) and vertical (value) axis along which the data is plotted in the chart.
- The legend of the chart.
- A chart and axis title that you can use in the chart.
- A data label that you can use to identify the details of a data point in a data series.
centile:What is the factor between chart height and inside heights (title, plotArea, legend) ?
I know chart zones well.
Using the same numbers to identify the zones, here what is not coherent, with values taken from a unique ‘Chart’ object:
1) chart area height : 242
2) plot area height : 2298
plot area Y : 760
We can see that plot area height is way bigger than chart area height.
Attached example with two simple charts : column and bar
Here are the results obtained with my version : 8.6.2.6
COLUMN CHART: TITLE_1
height: 267
inner height: 2517
title height: 524
plot area height: 3101
legend height: 345
BAR CHART: TITLE_2
height: 266
inner height: 2211
title height: 526
plot area height: 2586
legend height: 346
Hi Sébastien,
Hi again,
Hi Sébastien,
int top = chartPoint.getShapeY() * chartHeightPx / 4000;
My goal:
- take an existing chart
- resize its plot area inner height so that plotAreaInnerHeightInPixelsAfter = nbValues * plotAreaInnerHeightInPixelsBefore / 2
- resize char height so that plot area is the same distance from chart borders than before
I’ve provided a sample in which chart sizes are printed:
- before resizing
- after resizing
- after reloading the new chart
The values I’ve calculated for resizing and positioning seem correct.
But when we open the resized chart document, the Y positioning of the plot area is too big and the inner height is too low.
NB: Please note that the javadoc is full of copy/paste errors in ChartShape and PlotArea.
This part of the API is not self-evident and a valid documentation could help …
You could also add drawings and examples in it in order to simplify the support.
centile:My goal:
- take an existing chart
- resize its plot area inner height so that plotAreaInnerHeightInPixelsAfter = nbValues * plotAreaInnerHeightInPixelsBefore / 2
- resize char height so that plot area is the same distance from chart borders than before
I've provided a sample in which chart sizes are printed:
- before resizing
- after resizing
- after reloading the new chartThe values I've calculated for resizing and positioning seem correct.But when we open the resized chart document, the Y positioning of the plot area is too big and the inner height is too low.I have executed your code against the sample and have received the following output. Could you please confirm if you are concerned about the difference in highlighted values before reloading the chart from file and afterwards?8.6.3.61.8.0_66>>> INITIAL <<<chart height (pixel): 150plot area inner height: 880plot area inner height (pixel): 33plot area Y: 1147plot area Y (pixel): 43>>> RESIZED <<<chart height (pixel): 1470plot area inner height: 3682plot area inner height (pixel): 1353plot area Y: 117plot area Y (pixel): 43>>> RELOADED <<<chart height (pixel): 1470plot area inner height: 2852plot area inner height (pixel): 1048plot area Y: 1146plot area Y (pixel): 421centile:
NB: Please note that the javadoc is full of copy/paste errors in ChartShape and PlotArea.
This part of the API is not self-evident and a valid documentation could help ...
You could also add drawings and examples in it in order to simplify the support.
Sure, we will plan a complete review of JavaDocs in order to address any errors and for possible improvements/enhancements. We will keep you posted with updates in this regard.
babar.raza:I have executed your code against the sample and have received the following output. Could you please confirm if you are concerned about the difference in highlighted values before reloading the chart from file and afterwards?
Yes, indeed.
We can see that the plotAreaY in the reloaded chart is the same as the initial one despite the chart shape growth, which can be observed visually (there is a gap between the title and the plot area).
Also, the plot area inner height has been reduced (but this is certainly due to automatic resizing due to the fact that the plot area height could not fit in the remaining bottom room because of the Y wrong positioning).
Hi Sébastien,
plot area inner height: 880
plot area inner height (pixel): 33
plot area Y: 1147
plot area Y (pixel): 43
>>> RESIZED <<<
chart height (pixel): 1470
plot area inner height: 3682
plot area inner height (pixel): 1353
plot area Y: 117
plot area Y (pixel): 43
>>> RELOADED <<<
chart height (pixel): 1470
plot area inner height: 3682
plot area inner height (pixel): 1353
plot area Y: 114
plot area Y (pixel): 42
Hi,
Thanks for using Aspose.Cells.
This is to inform you that we have fixed your issue CELLSJAVA-41701 now. We will soon provide the fix after performing QA and including other enhancements and fixes.
The issues you have found earlier (filed as CELLSJAVA-41701) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.