Problem/Motivation

When using the chart API if the series data labels are part of the xaxis categories but not associated by the series data and the chart type is pie, the highcharts library render the chart with the word "slice" as label.

Steps to reproduce

Download the module, enable the chart api example then navigate to /charts/example/display and check the pie and donut chart.

Proposed resolution

Adjust how the labels are processed under the populateData in Drupal\charts_highcharts\Plugin\chart\Library.

Remaining tasks

Provide the patch or a merge request.

User interface changes

N/A

API changes

The populateData method in Drupal\charts_highcharts\Plugin\chart\Library would be adjusted to take into account series data labels provided through xaxis sub elements types or categories.

Data model changes

N/A

Issue fork charts-3239687

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

nikathone created an issue. See original summary.

nikathone’s picture

Title: Fix xaxis labels extraction for highcharts » Fix pie chart xaxis labels extraction for highcharts
Issue summary: View changes

Updated the title and description to clarify that this is only happening for pie and donut chart.

andileco made their first commit to this issue’s fork.

  • andileco committed e84a44d on 5.0.x authored by nikathone
    Issue #3239687 by nikathone: Fix pie chart xaxis labels extraction for...
andileco’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.