Hi friends,
Generally graph acts as easy to understand like a diagram and 3D design also to displays information basis on the variants. Microsoft AX also supports this functionality. For that we have to follow below process.
- Create table and add fields as below,
Fields :
Name Type
OverRuns String15
OverRuns String15
Overs String15
RunsQty RealBase
Add new method updateGraph() method into form and write this logic,
Finally, output will look like as,
- Create Form and add new control ManagedHost in design one dialog will open , you have select Client control for chart tool box. See below image for more.
NOTE : Change ManagedHost control property
Name : "ChartToollBox"
RTLCapable : No
Width : Column width
- Add another new one ManagedHost Control and add chart control (see below image) and click OK.
NOTE : Change ManagedHost control property
Name : "GraphControl"
RTLCapable : No
Width : Column width
void updateGraph()
{
#MACROLIB.ChartFx
AkkMatchScore AkkMatchScore; //Table buffer
graphics = new Graphics();
graphics.ManagedHostToControl(GraphControl);
graphics.parmCreateType(#CT_LEGEND | #CT_3D);
graphics.create();
graphics.parmTitle("@SYS95906");
graphics.parmTitleXAxis("Overs");
graphics.parmTitleYAxis("Runs");
while select AkkMatchScore
order by Overs
{
graphics.loadData(AkkMatchScore.Overs,
AkkMatchScore.OverRuns,
AkkMatchScore.RunsQty);
}
graphics.showGraph();
}
- Override init() method into form and write this logic,
public void init()
{
super();
chartToolBox = ChartToollBox.control();
chartToolBox.set_ChartControl(GraphControl.control());
this.updateGraph();
}
Comments
Post a Comment