Closed (fixed)
Project:
Charts
Version:
5.0.x-dev
Component:
Highcharts integration
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Dec 2021 at 07:25 UTC
Updated:
29 Jan 2022 at 09:34 UTC
Jump to comment: Most recent, Most recent file


Comments
Comment #2
n.ghunaim commentedComment #3
n.ghunaim commentedI developed this patch to get it working with the first-row option please review.
This is how it looks now:

Comment #4
n.ghunaim commentedComment #5
n.ghunaim commentedSmall fix on datalabels format
Comment #6
n.ghunaim commentedComment #7
n.ghunaim commentedComment #8
n.ghunaim commentedRollback the patch.
Comment #9
n.ghunaim commentedComment #10
andileco commentedThank you for working on this. This one gives me issues if I implement #8 and visit /charts/example/display (after enabling the charts_api_example module). Can you look into what may be happening?
Comment #11
n.ghunaim commentedHello andileco, I just opened this /charts/example/display and everything working well and all changes I did are on Highcharts only and the examples are for C3, so it shouldn't be affected by my changes.
So please can you give more details about the issues you faced.
Comment #12
andileco commentedSo if you set the default library to Highcharts here: /admin/config/content/charts, the charts at /charts/example/display will all be Highcharts. What happened was the donut became a solid donut instead of having multiple slices.
I looked into this a bit more (using your great examples above), and there's an issue with two files:
src/Element/ChartDataCollectorTable.php
src/Element/Chart.php
They should be generating an output more similar to the other places where charts works well for donuts and pies (through Views or the API).
I've started working on a patch, but won't be ready with it today.
Comment #13
andileco commentedUploading my patch to see how the tests run.
Comment #14
andileco commentedWith the patch in #13:
First column:

First row:

Comment #15
n.ghunaim commentedHello again @andileco!
I just tried to run your patch and it's working as expected, Thanks!
Comment #16
n.ghunaim commented@andileco, I noticed this error when trying to add donut chart after applied your patch
Warning: Undefined array key "title" in Drupal\charts\Element\Chart::buildElement() (line 397 of modules/contrib/charts/src/Element/Chart.php).
Can you please let me know what are you trying to get here, which title?
Comment #17
n.ghunaim commentedAdded if statement to check if this value exists or not for now.
Comment #18
andileco commentedAttaching with the edit mentioned in #16 since #17 didn't apply.
Comment #20
andileco commented