SH

Hi,

I want to display a pie chart graph in my report using Javascript.

Is this possible?

 

Any help will be appreciated

by Eva Klein
Badge for 'Community Team' achievement
Posted on Thu, 12/09/2010 - 11:02

Hi Sebouh,

you can create a pie chart by calling the method “Context.createChart”. The parameter specifies the type of chart, width and height. In your case for example:

var myChart3 = Context.createChart(Constants.CHART_PIE, 800, 800) // see ArisPieChart

For more information about Reports, check out the Reports & Macros in ARIS group. There are a lot of report tutorials

Regards,

Eva

0
by Sebouh Havatian Author
Posted on Thu, 12/09/2010 - 11:35

Thanks Eva

 

But Constants.CHART_PIE is not recognized by ARIS

 

and How can i display the chart in the report, any ideas?

 

thanks again

0
by Eva Klein
Badge for 'Community Team' achievement
Posted on Thu, 12/09/2010 - 11:46

Oh sorry, I made a mistake:

var mychart = Context.createChart(Constants.CHART_TYPE_PIE, 800, 800)

To display the chart call the method "OutGraphic":

... //set chart properties, data, ... 
output.OutGraphic( mychart.getPicture(), 100, 210, 297 ) 
Return value

I hope this information will help you.

Regards

Eva

0
by Sebouh Havatian Author
Posted on Thu, 12/09/2010 - 12:29

Thanks

i did it like this

 

 

var pic = myChart3.getPicture();     var sfileName = "11121.png";     var width = pic.getWidth(Constants.SIZE_PIXEL ) * 20 * (100.0/125.0) //twips, correction factor because of excel anomaly (X): * (100.0/125.0)     var xCells = width / 1024;     var xTwips = width % 1024;     var height = pic.getHeight(Constants.SIZE_PIXEL ) * 20*(100.0/133.0) //twips, correction factor because of excel anomaly (Y): \*(100.0/133.0)*/     var yCells = height / 256;     var yTwips = height % 256;     pic.setZoom(100) // image improvement only(optional)     pic.Save(dummyOutput, sfileName);     var data = Context.getFile(sfileName, Constants.LOCATION_OUTPUT);       var sheet = workbook.createSheet("CHART");       sheet.setPicture ( data, 0, 4, 0+xCells, 4+yCells, 0, 0, xTwips, yTwips);     Context.deleteFile(sfileName);     Thanks Eva for your continous support
0
by Sebouh Havatian Author
Posted on Wed, 01/26/2011 - 14:01

Is there a way to compare data in a bar chart?

for example I have 2 indicators and i want to compare there values in a 4 quarter time period.

See the picture pls

thanks

0
by Sebouh Havatian Author
Posted on Thu, 01/27/2011 - 06:36

Hi there,

 

Any help on the above question???

 

Thanks

0
by Eva Klein
Badge for 'Community Team' achievement
Posted on Thu, 01/27/2011 - 07:44

Hi Sebouh,

yes, it is possible with the following method:

chart.setMultiChartType(Constants.CHART_COMBINE_SIDE);
chart.setMultiData(aValues, sLegend);

I hope this will help you.

Regards

Eva

0
by Sebouh Havatian Author
Posted on Thu, 01/27/2011 - 09:36

Thanks Eva,

This is what I was looking for.

0

Featured achievement

Rookie
Say hello to the ARIS Community! Personalize your community experience by following forums or tags, liking a post or uploading a profile picture.
Recent Unlocks

Leaderboard

|
icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon icon-lock