Chart Image Mapping

Hi,

Thanks for using Aspose.Cells.

You are welcome. It’s good to know that chart.calculate() has fixed your issue.

We now do not understand completely all of your application how to use position of point. We think it is best if you tell us what information you want.

We can provide the information for charts like the following list.

Pie and Donought: R of the pie slice, start angle and end angle

Line, Scatter and Radar: Location of the point, line width, marker type, marker size

Area: Location of point, location of axis related the point

Bubble: Location of point, R of bubble

3-d chart: It’s too complex. I think we may provide a rectangle that cover the shape of point.

Hi,
Thanks for getting back to me. I think we need the following:

Pie: R of the pie slice, start angle and end angle, center location point

Doughnut: Inward and outward R, start and end angle, center location point, total number of ring levels, ring level of value

Line, Scatter: Location of the point, line width, marker type, marker size

Radar: Location of the point, location of axis

Area: Location of points, line width, location of axis

Bubble: Location of point, R of bubble

3-D: We’ll leave it to Aspose’s best judgement on how to solve that problem.

Thank you!


Hi,

Thanks for your feedback.

We have logged your comments in our database against the issue id: CELLSJAVA-40275

We will look into these requirements and implement them and get back to you asap.

Hi,

I was able to get the image map coordinates for the Column graph,
but we’re having issues getting the Bar graph’s coordinates. Based on
the diagram provided by Amjad, the same code should work for both the
Bar and Column, but that isn’t the case. This is what I’m trying:



int left = point.getShapeX() * chartWidthPx / 4000;

int top = point.getShapeY() * chartHeightPx / 4000;

int right = chartWidthPx - left - (point.getShapeWidth() * chartWidthPx / 4000);

int bottom = chartHeightPx - top - (point.getShapeHeight() * chartHeightPx / 4000);



which is returning the following values for the first bar:



left = 40 top = 229 bottom = 49 right = 287



It seems like the values of
getShapeX()/getShapeY()/getShapeHeight()/getShapeWidth() appear to have a
different coordinate bearing than what was implied. I have attached the
sheet that I’m using for testing so that you can try it. Could you please provide another
diagram explaining what each of the 4 functions applies to within the
bar graph, and possibly provide a code example for bar? Thank you.

ibmlittleton:
Hi,
I was able to get the image map coordinates for the Column graph, but we're having issues getting the Bar graph's coordinates. Based on the diagram provided by Amjad, the same code should work for both the Bar and Column, but that isn't the case. This is what I'm trying:

int left = point.getShapeX() * chartWidthPx / 4000;
int top = point.getShapeY() * chartHeightPx / 4000;
int right = chartWidthPx - left - (point.getShapeWidth() * chartWidthPx / 4000);
int bottom = chartHeightPx - top - (point.getShapeHeight() * chartHeightPx / 4000);

which is returning the following values for the first bar:

left = 40 top = 229 bottom = 49 right = 287

It seems like the values of getShapeX()/getShapeY()/getShapeHeight()/getShapeWidth() appear to have a different coordinate bearing than what was implied. I have attached the sheet that I'm using for testing so that you can try it. Could you please provide another diagram explaining what each of the 4 functions applies to within the bar graph, and possibly provide a code example for bar? Thank you.
Hi,

Thanks for your posting and using Aspose.Cells for Java.

We will soon look into your this particular issue and help/advise you asap. Also, if we require further information at your end, we will request you to provide it.

Please note, this issue has been logged separately with the issue id: CELLSJAVA-40336.

Just wanted to say that after taking another attempt at it, I was able to figure out the mapping for bar charts as well as column charts. The image mapping works perfectly for what we need it for, and I just wanted to express my gratitude to the Aspose team for a job well done! I look forward to the next set of image mapping features for all of the other chart types.

Hi,

Thanks for your feedback.

Based on your comments, I have now closed the issue id: CELLSJAVA-40336

Now only issue id: CELLSJAVA-40275 is open.

Let me know if you have any question or concerns.

As soon as there is some update for you relating to 40275, we will let you know asap.

Hi,
Our Image Mapping implementation seems to no longer work with jar 7.3.3.4. All of the ChartPoints are returning values of 0 for ChartPoint.getShapeX()/getShapeY(). To confirm, we reverted back to 7.3.3.3 and it seems to be working. Could you please look into this issue? Thank you.

Hi,

Thanks for your posting and using Aspose.Cells for Java.

We have investigated your issue and we were able to repeat this issue using the latest version: Aspose.Cells for Java 7.3.4.

We will look into it further and provide you a new fix soon. Once the issue is resolved, we will update you by posting on this thread.

Please also share your own sample code. It could also be helpful in resolving this issue properly.

Hi Shakeel,
It’s great that you were able to reproduce it. To help you guys, here is a sample Workbook and some simple testcode that illustrates all of the points returning as 0. Also, when you get a chance, could you please provide a status on how the other Image Mapping features are coming along? Although this defect is higher priority, we really do need the other image maps as well. Thank you for your help.

String dir = “C:/asposetest”;
Workbook workBook = new Workbook(dir + “/ColumnAndBarChart.xlsx”);

Worksheet sheet = workBook.getWorksheets().get(0);
Chart chart = sheet.getCharts().get(0);
SeriesCollection seriesCollection = chart.getNSeries();

for(int i = 0; i < seriesCollection.getCount(); i++){
Series series = seriesCollection.get(i);
ChartPointCollection points = series.getPoints();
for(int j = 0; j < points.getCount(); j++){
ChartPoint point = points.get(j);
System.out.println(point.getShapeX()+" “+point.getShapeY()+” “+point.getShapeWidth()+” "+point.getShapeHeight());
}
}

Hi,

Thanks for your sample code and providing us your feedback

Please spare us some time before we could provide you a fix. Hopefully, next fix will resolve your issues.

We have also logged your sample code and comments against the issue id: CELLSJAVA-40275.

Once, we will have some update for you, we will let you know asap.

Hi,

Please try the new fix to get bar/column’s position after calling calculate() method.

We have fixed the bug that existed in previous jar i.e getShapeX()/getShapeY() is not working.

Please download and try this fix: Aspose.Cells for Java (Latest Version) and let us know your feedback.

Seems to have been fixed, thank you for the quick response. It has been quite some time since we put in the request for image mapping of other chart types (such as Pie, Scatter etc). Is there any update on any of the others being implemented? Even incremental updates, such as introducing image mapping for one chart at a time, would be really beneficial to us for our development purposes. Please let us know, thank you.

ibmlittleton:
Seems to have been fixed, thank you for the quick response.
Hi,

Thanks for your feedback.

It's good to know your issue is resolved now.

ibmlittleton:
It has been quite some time since we put in the request for image mapping of other chart types (such as Pie, Scatter etc). Is there any update on any of the others being implemented? Even incremental updates, such as introducing image mapping for one chart at a time, would be really beneficial to us for our development purposes. Please let us know, thank you.
For this issue, could you please elaborate your issue again in a separate thread so that we could look into your remaining issue separately and transparently.

You can copy your relevant posts and their contents along with screenshots and sample code in a separate thread.