Commit 5a16de98 authored by Daniel Cothran's avatar Daniel Cothran Committed by Daniel Cothran
Browse files

Issue #3291186 by andileco, nikathone: Front-end Color Switcher

parent 3e41a108
Loading
Loading
Loading
Loading
+3 −2
Changes for charts.module: 3 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -68,7 +68,8 @@ function template_preprocess_charts_chart(&$variables) {
    '#attributes' => $attributes,
    '#value' => isset($element['#chart']) ? $element['#chart'] : '',
  ];

  $variables['content_prefix'] = $element['#content_prefix'];
  $variables['content_suffix'] = $element['#content_suffix'];
  $config = \Drupal::service('config.factory')->getEditable('charts.settings');
  $variables['debug'] = [];
  if (!empty($config->get('advanced.debug'))) {
@@ -85,7 +86,7 @@ function template_preprocess_charts_chart(&$variables) {
        '#type' => 'html_tag',
        '#tag' => 'code',
        '#attributes' => [
          'class' => ['language-json']
          'class' => ['language-json'],
        ],
        '#value' => t('If this is blank, your library will need to implement code in your JavaScript. Please see the README.md.'),
        '#suffix' => '</pre>',
+1 −0
Changes for config/install/charts.settings.yml: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ charts_default_settings:
      - '#ff9b8f'
      - '#85000f'
      - '#ff7581'
    color_changer: false
    title_position: out
    tooltips: true
    tooltips_use_html: false
+3 −0
Changes for config/schema/charts.data_types.schema.yml: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -191,6 +191,9 @@ charts_config:
                  label: 'Colors'
                  sequence:
                    type: charts_views_field_entity_grouping_selected_method_colors
        color_changer:
          type: boolean
          label: 'Expose color changer'
    display:
      type: charts_display
      label: 'Display'
+1 −0
Changes for modules/charts_api_example/src/Controller/ChartsApiExample.php: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -353,6 +353,7 @@ class ChartsApiExample extends ControllerBase {
        'series' => $series,
        'x_axis' => $xaxis,
        'y_axis' => $yaxis,
        '#color_changer' => TRUE,
        '#raw_options' => [],
      ];

+9 −0
Changes for modules/charts_highcharts/charts_highcharts.libraries.yml: 9 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -41,3 +41,12 @@ highcharts_exporting:
  dependencies:
    - charts_highcharts/charts_highcharts
    - charts_highcharts/highcharts

color_changer:
  version: VERSION
  js:
    js/color_changer.js: { }
  dependencies:
    - charts/global
    - core/once
    - charts_highcharts/charts_highcharts
Loading