1. Mark Jones
  2. PowerBuilder
  3. Wednesday, 17 February 2021 16:23 PM UTC

I am loving the inclusion of a demo app to show the Apache E-Chart charting tools in PB 2019 R3.  I have been asked if we would be able to retrofit this into our existing PB 2019 R2 based application.   Does anyone know if that is feasible using the inet object?

 

Mark

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 17 February 2021 20:43 PM UTC
  2. PowerBuilder
  3. # 1

Hi Mark;

  That should work as the R2 and R3 run-times are named differently as R3's is now decoupled. So as long as your App and subordinate EXE find their respective run-time DLL's - you should be good to call the R3 EXE from your R2 App and have the chart rendered.

  The other things that you could do is use Roland's Run & Wait code to monitor the R3 App from your R2 App to know when the user closes it before proceeding (if required). You can also use the FindWindow() SDK and Send() PB command to close the R3 App EXE when the R2 App exe is closing if for some reason, the R3 App EXE is still running behind the scenes.

Food for thought.  HTH

Regards ... Chris

Comment
  1. Mark Jones
  2. Wednesday, 17 February 2021 20:58 PM UTC
Chris, thanks for the reminder of the run and wait. We do use that for some other shell outs very effectively. We actually use it to launch Infomaker so our customers can edit reports from within our app....
  1. Helpful
There are no comments made yet.
Mark Jones Accepted Answer Pending Moderation
  1. Wednesday, 17 February 2021 20:05 PM UTC
  2. PowerBuilder
  3. # 2

I actually just had an 'aha' moment on how to achieve this.   In earlier versions of our application written in PB6.5, PB12.5, PB2019 R2  we have the ability to display embedded web pages.   So all we need to do is use a standalone PB 2019 R3 app to read a datawindow export (PBR) file and then generate the chart html for the web page which can then be displayed in any of our applications.

We were planning on using a text object inside the datawindow to control the graph title, type, columns to be used etc.   so we just need to pass the datawindow into the app and get a file with a web page back!

 

Mark 

Comment
  1. Armeen Mazda @Appeon
  2. Wednesday, 17 February 2021 20:21 PM UTC
That is an interesting workaround to get Apache ECharts from PB 2019 R3 into 2019 R2. Not sure if that will work, but you can give it a try. Let us know how it goes. Worst case scenario, you can get Google Charts to work in PB 2019 R2 because it doesn't need advanced features of the WebBrowser control, and we have demo app that illustrates how to get this working.
  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 17 February 2021 16:40 PM UTC
  2. PowerBuilder
  3. # 3

The Apache ECharts is complex JavaScript library that uses the JavaScript execution features we added to the WebBrowser control in PB 2019 R3.

However, it is possible to integrate Google Charts using the WebBrowser control (not inet object).  There is a demo app with Google Charts on GitHub for PB 2019 R2.

 

Comment
  1. Armeen Mazda @Appeon
  2. Wednesday, 17 February 2021 17:15 PM UTC
Not sure I understand your response. If I understood correctly, you want a solution that works with PB 2019 R2. Just to clarify, Apache ECharts is not going to work with older versions of PB. If you cannot upgrade to PB 2019 R3, you'll have to go with a simpler charting solution, like Google Charts. The demo link I provided is a Google Charts example.
  1. Helpful
  1. Miguel Leeuwe
  2. Friday, 19 February 2021 08:19 AM UTC
Wow! After all these years we finally get a (free) solution to show some charts.

This is great! I can throw away my own made .Net ActiveX with MS charts, one install less!

Cheers.
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Friday, 19 February 2021 14:25 PM UTC
Yes, the WebBrowser control in PB 2019 R3 let’s you make use of free charting solutions, and there is example app included in PB 2019 R3 that shows both Apache ECharts and Google Charts.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.