Tuesday, November 26, 2019

My First PCF Control - Activity analyzer (using Chartjs)

After a little deepdive and with help of PCF Gallery I was able to create my First PCF control, meet Activity Analyzer a humble PCF Control which shows activity subgrid in doughnut chart. 

With limitless possibilities with PCF control this humble can be grown into hulk. 

For all the fellow Dynamics CRM developers, PCF would be easy to pickup if you have worked on HTML, JS based webresources. Initial trouble i had is with TypeScript which is new to me but was similar to Javascript.

Please Refer below Image on how to add the custom control into your form



Parameters for the Control are as below
  1. View Used : Current View to which the control is added
  2. Activity Names: Names of the activities to be displayed in Chart
  3. Activity Color: Color code for the activities mentioned in param 2.
  4. Chart Type: type of the chart to be displayed (e.g.: pie, bar, doughnut, etc)
  5. Chart Title: Title of the Chart to be displayed.


Source Code can be found here, CRM Solution can be found here

Guides for Power Apps Components Framework which helped me out are below
  1. Microsoft Docs
  2. PCF Gallery