You are here

README.txt in Charts 8.3

Installation using Composer (recommended)
========================================

If you use Composer to manage dependencies, edit "/composer.json" as follows.

  1. Run "composer require --prefer-dist composer/installers" to ensure that you
     have the "composer/installers" package installed. This package facilitates
     the installation of packages into directories other than "/vendor" (e.g.
     "/libraries") using Composer.

  2. Add the following to the "installer-paths" section of "composer.json":

     "libraries/{$name}": ["type:drupal-library"],

  3. Add the following to the "repositories" section of "composer.json":

        {
            "type": "package",
            "package": {
                "name": "google/charts",
                "version": "45",
                "type": "drupal-library",
                "extra": {
                    "installer-name": "google_charts"
                },
                "dist": {
                    "url": "https://www.gstatic.com/charts/loader.js",
                    "type": "file"
                },
                "require": {
                    "composer/installers": "~1.0"
                }
            }
        }

4. Run "composer require --prefer-dist google/charts:45"
- you should find that new directories have been created under "/libraries"

Please note: if you observe an SSL error when trying to download this library,
you can address this by changing the "url" in the code above to
"http://www.gstatic.com/charts/loader.js" and by adding in: "secure-http": false

File

modules/charts_google/README.txt
View source
  1. Installation using Composer (recommended)
  2. ========================================
  3. If you use Composer to manage dependencies, edit "/composer.json" as follows.
  4. 1. Run "composer require --prefer-dist composer/installers" to ensure that you
  5. have the "composer/installers" package installed. This package facilitates
  6. the installation of packages into directories other than "/vendor" (e.g.
  7. "/libraries") using Composer.
  8. 2. Add the following to the "installer-paths" section of "composer.json":
  9. "libraries/{$name}": ["type:drupal-library"],
  10. 3. Add the following to the "repositories" section of "composer.json":
  11. {
  12. "type": "package",
  13. "package": {
  14. "name": "google/charts",
  15. "version": "45",
  16. "type": "drupal-library",
  17. "extra": {
  18. "installer-name": "google_charts"
  19. },
  20. "dist": {
  21. "url": "https://www.gstatic.com/charts/loader.js",
  22. "type": "file"
  23. },
  24. "require": {
  25. "composer/installers": "~1.0"
  26. }
  27. }
  28. }
  29. 4. Run "composer require --prefer-dist google/charts:45"
  30. - you should find that new directories have been created under "/libraries"
  31. Please note: if you observe an SSL error when trying to download this library,
  32. you can address this by changing the "url" in the code above to
  33. "http://www.gstatic.com/charts/loader.js" and by adding in: "secure-http": false