I am aware that the module is still being ported with contributor privileges discussed. Need to layout the api changes between the Drupal 7 version of the module and the 8.x branch. I have installed the 8.x branch to determine convertibility and am unable to determine the classes needed to access the charts render array. I am sure others will have similar issues in custom module api calls to the charts module.

Comments

JMOmandown created an issue. See original summary.

andileco’s picture

Status: Active » Postponed

Thanks, @JMOmandown. I'm postponing until the Alpha release, as this may change a bit in the meantime.

Can you share more about how you used the Drupal 7 module and how you plan to use it in Drupal 8? We definitely focused on a Views-based workflow.

JMOmandown’s picture

We use it heavily in custom application work. Views has a bit more restrictive structure that would not allow for that sort of display.

In particular there are items attached to Commerce's data field which are then stored via BLOB and not via fields. In our scenario you are talking about having hundreds of input points from across entities which views would render huge performance issues in that regard or the need to manage hundreds of fields within views. It is easier in scenarios with larger data points / sets to compile the information on the backend then have it render through the page controller to the graphical receiver (Charts in this case).

I'd be happy to walk you through offline if you would like as I am not able to post code for this particular project.

With that said, it is probably correct to be focused on the views integration at this point as it will satisfy the majority of use cases for most individuals using the module. However, I will say that the ability to call charts outside of views has allowed us to achieve some pseudo big data analysis and displays that are not achievable elsewhere without the direct importing of a charting library which tends to be messy when dealing with those large data sets as they all require the direct injection of script.

Think of instances where data is sensitive and cannot be stored via Drupal to begin with or where it is dynamically received remotely.

andileco’s picture

Thanks, @JMOmandown! This is very helpful background information.

mwebaze’s picture

@JMOmandown would exposing the render array through a REST service be helpful?

andileco’s picture

Version: 8.x-1.x-dev » 8.x-3.x-dev
Status: Postponed » Needs review

Hi @JMOmandown, the latest 8.x-3.x-dev contains an example module that doesn't use views.

A few notes:

  • Make sure you've installed the base Charts module and the sub-modules for whichever libraries you would like to use. This means using Composer to get the libraries.
  • This example module uses settings from /admin/config/content/charts
  • The code for the example chart is at charts/charts_api_example/src/Controller/ChartsApiExample.php
  • You can access the example chart on this page /charts/example/display

Looking forward to hearing your thoughts.

andileco’s picture

Issue tags: +sprint, +DrupalGovCon
andileco’s picture

Status: Needs review » Closed (outdated)