Create a nice looking chart with CL_GUI_CHART_ENGINE - Part 1 - Chart Designer

At the beginning of my work with SAP I was disappointed with the charts that was available in standard transactions. In fact I am still :) But when I have to create own program with nice looking chart then it's no longer a problem as we can use  CL_GUI_CHART_ENGINE together with  chart designer provided by SAP. Chart designer is a tool which allows you to create a customizing for your chart and save it in XML file which can be used in ABAP after.

So first of all we need to download chart designer from SDN so you can google "sap chart designer" to get it. After you'll have it just run one of the versions available there (640 or 700) depending on your GUI version. All files which you'll find in the package are shown below, XML Format.pdf file will tell you how to prepare chart data depending on chart type.
 

When you run ChartDesigner you'll se that there is a lot of chart types available for your use, surely you'll find the one you need here. 
 
Step 1) For my article purpose I will use Pie2.5D type
 
 
Step 2) Let's setup title, subtitle, number of series and categories. In title I will use string  TITLE_REPLACE and for subtitle  SUBTITLE_REPLACE to be able to easily replace it to dynamic texts during creation of chart in ABAP. I'll set up 1 series and 3 categories for our demo.
 
 
Step 3) Here we can customize the colors for our categories and if we want to display labels or not. I will use text labels here.
 
 
Step 4) Here we can customize background, plot area, title, subtitle and legend styles:
 
For Background we can make it visible or not, set colors and gradients.
 
Same settings are available for Plot Area
 
For Title we can set up font size, font family, font color , font style and position.
 
Same we can do for Subtitle.
 
For Legend we can set if we want to have it on chart or not, its alignment and position.
 
Step 5) (Yeah I know it's on the screen-shot as 6 ) Just the info that we finished.
 
 
Step 6)  At the end we receive all customization in one place so we can adjust something if needed or jus save the XML using "File" menu.
 
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值