sábado, 19 de febrero de 2022

[JD Edwards] Form Charts - ChartControl Component (ENG)

Hola jdedwerds,

I recently worked on a project where we needed to display KPI's of sales orders processed automatically, so beside showing the boring tables with the processed orders info and the percentage calculation in certain fields, I thought of adding a graph which is always more visually pleasing.

This time I have done it natively, it's true that we have had this tool for quite some time but I've rarely seen it used even in a standard apps - on the P41021 availability app and on some planning/production applications- and I don't understand why (it are not the most powerful charts for that there are other tools, but for simple cases use it should be enough)

It's true that we have other tools in the environment itself such as One View Reporting OVR or that KPI's are usuarlly analyzed in business with Business Intelligence BI tools, but why not give them a touch of color to our JDE applications??




The first thing to do is to insert a ChartControl in our form:



Then, in the event where we have the information to display (after reading each grid line, at the end of the grid, etc.) we create a variable to load the XML tags needed for the chart -in my case a foot chart-. Then, we load the information to the chart through the Set Data XML function available in the Chart Control Functions section of the System Functions. And finally, we perform the action to draw the chart with the Draw Chart function avaible in the same section previously seen:




Therefore, the code would like this:


The following chart types are available:

  • bar_basic
  • bar_basic_percent
  • cluster_bar_basic
  • combo_basic
  • line_basic
  • pie_basic
  • pie_ontime
  • stacked_bar_basic
  • stacked_bar_ontime

We can perform visualization tests of graphs and examples created in our installation on our web server with the resource http://<webhost>:<webport>/jde/GraphPrototype.maf




For more oficial information in the next link: https://support.oracle.com/epmos/faces/DocumentDisplay?id=648865.1

The next thing I want to integrate are external charts from Google Charts, through a TextBlock and with the API's provided by Google. I'll try to make a POC, soon.

I hope you found it interesting and useful.

Best regards.

Alfredo.

No hay comentarios:

Publicar un comentario