From e2489d82174f9cab377ccd753237e6fb30565d88 Mon Sep 17 00:00:00 2001 From: Andrew Stoltman Date: Mon, 7 Oct 2024 16:01:32 -0400 Subject: [PATCH] Fix aggregate chart xaxis labels by correctly using xAxis values array from xAxis object instead of using yAxisObject->getXValue() --- classes/DataWarehouse/Visualization/AggregateChart.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/classes/DataWarehouse/Visualization/AggregateChart.php b/classes/DataWarehouse/Visualization/AggregateChart.php index 41a0789ce2..67d9e8f8f6 100644 --- a/classes/DataWarehouse/Visualization/AggregateChart.php +++ b/classes/DataWarehouse/Visualization/AggregateChart.php @@ -942,9 +942,9 @@ public function configure( $std_err_labels_enabled = property_exists($data_description, 'std_err_labels') && $data_description->std_err_labels; $isThumbnail = $this->_width <= \DataWarehouse\Visualization::$thumbnail_width; $this->_chart['layout']['stdErr'] = $data_description->std_err; + $xValues = $this->_xAxisDataObject->getValues(); $trace = array(); $drilldown = array(); - $xValues = array(); $yValues = array(); $drillable = array(); $text = array(); @@ -958,7 +958,6 @@ public function configure( // If the first value, give it the yAxisColor so we don't skip // that color in the dataset. Otherwise, pick the next color. $yValues[] = $value; - $xValues[] = $yAxisDataObject->getXValue($index); $colors[] = ($index == 0) ? $yAxisColor : '#'.str_pad(dechex($this->_colorGenerator->getColor() ), 6, '0', STR_PAD_LEFT); $drillable[] = true; @@ -1007,7 +1006,6 @@ public function configure( foreach( $yAxisDataObject->getValues() as $index => $value) { $yValues[] = $value; - $xValues[] = $yAxisDataObject->getXValue($index); $drillable[] = true; // N.B.: The following are drilldown labels. // Labels on the x axis come from the x axis object