Skip to content
Snippets Groups Projects
Commit ff1e0976 authored by Dylan Donkersgoed's avatar Dylan Donkersgoed Committed by Daniel Cothran
Browse files

Issue #3449103 by Dylan Donkersgoed: Pie, Donut charts in chart block fail to...

Issue #3449103 by Dylan Donkersgoed: Pie, Donut charts in chart block fail to render with Google Charts
parent 3b1e2deb
No related branches found
No related tags found
1 merge request!90Updated Google charts library to set a dummy first row for pie/donut charts so...
Pipeline #179581 passed with warnings
......@@ -548,6 +548,10 @@ class Google extends ChartBase implements ContainerFactoryPluginInterface {
$data = $chart_definition['data'];
// Stub out corner value.
if (in_array($element['#chart_type'], ['pie', 'donut'])) {
// Populate the 0th row with the same number of values as the 1st row.
$data[0] = array_fill(0, count($data[1]), '');
}
$data[0][0] = $data[0][0] ?? 'x';
if ($element['#chart_type'] === 'bubble') {
$data[0][2] = 'bubble';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment