Skip to content
Snippets Groups Projects
Commit 2dbd3e45 authored by Daniel Cothran's avatar Daniel Cothran
Browse files

Issue #3466764 by andileco, nikathone: Add prefix to $set_label to prevent...

Issue #3466764 by andileco, nikathone: Add prefix to $set_label to prevent numbers being stripped by Html::cleanCssIdentifier
parent 9a0c5030
No related branches found
No related tags found
1 merge request!107Resolve #3466764 "Add prefix to"
Pipeline #248143 passed with warnings
......@@ -742,7 +742,9 @@ class ChartsPluginStyleChart extends StylePluginBase implements ContainerFactory
$element_key_prefix = $this->view->current_display . '__' . $label_field_key;
$chart_settings = $this->options['chart_settings'];
foreach ($sets as $set_label => $data_set) {
$name = strtolower(Html::cleanCssIdentifier($set_label));
$name = strtolower(Html::cleanCssIdentifier('set-label-' . $set_label));
// Remove the added prefix after processing.
$name = substr($name, strlen('set-label-'));
$element_key = $element_key_prefix . '__' . $name;
$chart[$element_key] = [
'#type' => 'chart_data',
......
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