Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix regression introduced in efbd9ce0d2dbe5e1f214d72fe0cf0cc1523ea487 #1994

Open
wants to merge 1 commit into
base: xdmod11.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 7 additions & 18 deletions classes/DataWarehouse/Visualization/AggregateChart.php
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,13 @@ public function configure(
$this->setSubtitle($subtitle, $font_size);
}

// Pie charts are always summarized
foreach ($data_series as $dsv) {
if ($dsv->display_type == 'pie') {
$summarizeDataseries = true;
}
}

// ----------- set up xAxis and yAxis, assign to chart -----------

$yAxisArray = $this->setAxes($summarizeDataseries, $offset, $x_axis, $font_size);
Expand All @@ -749,24 +756,6 @@ public function configure(

// ------------ prepare to plot ------------

// --- If ME, Does any dataset specify a pie chart? If so, set to truncate/summarize -- //
// This corrects the 'pie charts are wrong' bug...
if ( !$summarizeDataseries )
{
foreach($yAxisArray as $yAxisIndex => $yAxisObject)
{
foreach ($yAxisObject->series as $data_object)
{
if ( $data_object['data_description']->display_type=='pie' )
{
// set to summarize, then break both loops.
$summarizeDataseries = true;
break 2;
}
}
}
}

if ($summarizeDataseries)
{
// disable ME paging by setting dataset size to 1
Expand Down