How to create custom charts in dev portal

sarthak
Participant V

Is there any writeup or samples on how to create a custom graph/chart in dev portal ? I see we are shipping Highchart and google charts module ... any tutorial on how to use them with our analytics APIs to create custom graphs ?

1 8 970
8 REPLIES 8

I think you will need to create a new drupal module to do that, easier way is build HTML5 custom charts and add them as plain html content in the portal

for eg, http://dev-everydaybank.devportal.apigee.com/user/...

Well, that looks like a lot of development work. Need to justify between building this as standalone vs. building using our portal. Based on what you said I see it being no way easier to build using our portal?

Is the source code for the above graph available to reuse?

it should be fairly straightforward to build a html5 chart using the Analytics API, the analytics response data is very simple to consume in a chart - i have used earlier with google charts, highcharts, c3, d3 - will send you some samples

By point is based on what you mentioned I can build that in a standalone HTML5 app too ? And it might be easier , since I don't have to learn PHP and drupal ? In your example the way I see it the dev portal is acting only as the hosting platform. Do you agree ?

@sarthak
  • Yes, You need Drupal Module Development Expertise along with PHP knowledge. You need to implement a small custom module.
  • You can build it easily using drupal contributed modules, like D3, HighCharts etc.
  • Remember, to pull data you need make Edge API calls, You can not embed just HTML5 charts which acts like a client app. Securing APIs will be an issue if they are plain HTML5 widgets. @Mukundha Madhavan , Interested to know how security taken care using HTML5 widgets.
  • You can use Apigee PHP SDK functionality available in Apigee Developer Portal to do the job.
  • Simple Custom Analytics Dashboard will be 4 hours of effort to make it up & running in Developer Portal.

I will try to write a simple example module and post here detailed steps when i get time so that we can extend same with few changes. I will keep you posted.

Can you please provide the sample code

@Nikhil , Unfortunately, I didn't get a chance to work on same. But it should be fairly easy thing for the person with little Drupal Expertise in creating custom modules.

@Anil Sagar It will be great, if you could steps (or code, if possible) to implement edge Analytics API authentication on Dev portal?

Thanks!