Adoxio / xRM-Portals-Community-Edition

The definitive edition of Microsoft Open Source Portals, supported by the experts in portals.
MIT License
107 stars 60 forks source link

Displaying Charts #47

Closed TinoRabeGermany closed 6 years ago

TinoRabeGermany commented 6 years ago

Hi,

I am trying to use the built-in chart functionality using the Liquid Markup syntax:

General syntax: {% chart id:"chart-guid-without-braces" viewid:"view-guid-without-braces" %}

Example: {% chart id:"EB02E9AA-5580-E611-80D8-00155DFE75F9" viewid:"00000000-0000-0000-00AA-000010003002" %}

I made sure that my Portal User does have the required Entity Permissions for the entitiy of that chart. Still, the chart will not show in the Portal. On the Portal, only a loading message keeps circulatiing forever and no chart is shown.

Does someone maybe know if the extended Liquid Markup is not taken over to the Communty Edition and therefore is only available for the Online Portals?

Thank you and best regards.

amervitz commented 6 years ago

Please test if it works in the online portals. If it works there then we can look into this.

TinoRabeGermany commented 6 years ago

Yes, charts work as expected in online portals. I tested with three different Community Portals, where each Portal is connected to an unique CRM organization. The behavior can be reproduced every time.

amervitz commented 6 years ago

Are there any client-side or server-side exceptions? Client-side can be seen in the web browser's developer tools JavaScript console, server-side might be seen in the server's event viewer or one of the requests seen in the website's trace.axd page.

amervitz commented 6 years ago

I've determined the chart tag doesn't work because there are 2 JavaScript files that weren't included in the open source portals release by Microsoft. These files come from the Highcharts charting library, which is released under several licences - multiple paid commercial licenses and one free non-commercial license, none of which are suitable for redistribution in an open source project such as this.

Here are steps that can be taken to update the code base to enable the charting functionality, after complying with the licensing:

  1. Download and save these files to the /js/charts/highcharts folder in the MasterPortal project:
    • https://code.highcharts.com/4.2.6/modules/funnel.js
    • https://code.highcharts.com/4.2.6/highcharts.js
  2. Open the properties of the MasterPortal project and add these conditional compilation symbols in the Build tab:
    • HIGHCHARTS
    • HIGHCHARTSFUNNEL image
  3. Build the project

I've created an Enabling charting functionality wiki page with this information.