Team,
I’m using the Aspose document template which converts the .docx file to .pdf report and we are facing an issue while getting the summarized value in the Chart values.
Expected Output in Chart:
My Current Output:
Current Chart Design in Word Template:
Current Chart Values in Word Template:
Could someone please help me to get the Chart in expected format/values ?
Thanks in Advance…!
@velmurugan.veerarajan
The best way to achieve your requirement is modifying input data, so that necessary items are summarized before building a report. This implies the simplest possible template syntax.
However, if modifying of input data is not possible in your case, you can change tags located in the chart as follows:
<<foreach [gr in GeographicalAllocation.groupBy(a => a.Fund > 1.5 ? a.Name : "Others").orderByDescending(g => g.key == "Others" ? -1 : g.sum(a => a.Fund))]>>
<<x [gr.key]>>
<<y [gr.sum(a => a.Fund)]>>
Hi @ivan.lyagin ,
Thanks for your quick response.
I’ve tried your suggestion like below in the Chart Element,
But it returns below error while converting the word template document to PDF,
Tried to resolve the issue. But I didn’t get any solution.
Do you have any idea on this ?
Also, Is it possible to get the values by it’s “indexOf()” method in foreach which is located in the Chart element ?
Thank you…!
@velmurugan.veerarajan
As per Using Charts to Represent Sequential Data (and the error message you get), y
tags should be located in chart series names. My previous reply was about changing of the tags, not about moving them. My apologies for any confusion.
It is possible to use indexOf
within some tags such as x
, y
, and some others.