mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
update visualize legend to correctly check if it should show
This commit is contained in:
parent
ed1b3304e5
commit
9bd80be07a
1 changed files with 3 additions and 3 deletions
|
@ -55,7 +55,7 @@ uiModules.get('kibana')
|
|||
};
|
||||
|
||||
$scope.toggleLegend = function () {
|
||||
let bwcAddLegend = $scope.renderbot.vislibVis.hasLegend();
|
||||
let bwcAddLegend = $scope.vis.params.addLegend;
|
||||
let bwcLegendStateDefault = bwcAddLegend == null ? true : bwcAddLegend;
|
||||
$scope.open = !$scope.uiState.get('vis.legendOpen', bwcLegendStateDefault);
|
||||
$scope.uiState.set('vis.legendOpen', $scope.open);
|
||||
|
@ -100,8 +100,8 @@ uiModules.get('kibana')
|
|||
function refresh() {
|
||||
let vislibVis = $scope.renderbot.vislibVis;
|
||||
|
||||
if ($scope.uiState.get('vis.legendOpen') == null && vislibVis.hasLegend()) {
|
||||
$scope.open = vislibVis.hasLegend();
|
||||
if ($scope.uiState.get('vis.legendOpen') == null && $scope.vis.params.addLegend != null) {
|
||||
$scope.open = $scope.vis.params.addLegend;
|
||||
}
|
||||
|
||||
$scope.labels = getLabels($scope.data, vislibVis.visConfigArgs.type);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue