mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
renaming heatmap options
This commit is contained in:
parent
8c888d4b25
commit
55a8b5f87f
3 changed files with 20 additions and 17 deletions
|
@ -11,6 +11,7 @@
|
|||
ng-options="mode for mode in vis.type.params.colorSchemas"
|
||||
></select>
|
||||
</div>
|
||||
<div class="text-info text-center" ng-show="customColors" ng-click="resetColors()">reset colors</div>
|
||||
</div>
|
||||
|
||||
<div class="kuiSideBarFormRow">
|
||||
|
@ -30,20 +31,6 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="kuiSideBarFormRow">
|
||||
<label class="kuiSideBarFormRow__label" for="axisScale">
|
||||
Z Axis Scale
|
||||
</label>
|
||||
<div class="kuiSideBarFormRow__control">
|
||||
<select
|
||||
id="axisScale"
|
||||
class="kuiSelect kuiSideBarSelect"
|
||||
ng-model="vis.params.scale"
|
||||
ng-options="mode for mode in vis.type.params.scales"
|
||||
></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="kuiSideBarFormRow">
|
||||
<label class="kuiSideBarFormRow__label" for="setColorRange">
|
||||
Custom Range
|
||||
|
@ -84,6 +71,7 @@
|
|||
ng-model="color.value"
|
||||
type="number"
|
||||
ng-required="vis.params.setColorRange"
|
||||
greater-than="{{getGreaterThan($index)}}"
|
||||
>
|
||||
</div>
|
||||
</div>
|
|
@ -1,15 +1,26 @@
|
|||
import uiModules from 'ui/modules';
|
||||
import heatmapOptionsTemplate from 'plugins/kbn_vislib_vis_types/controls/heatmap_range_option.html';
|
||||
import heatmapOptionsTemplate from 'plugins/kbn_vislib_vis_types/controls/heatmap_options.html';
|
||||
import colorFunc from 'ui/vislib/components/color/heatmap_color';
|
||||
const module = uiModules.get('kibana');
|
||||
|
||||
module.directive('heatmapOptions', function ($parse, $compile) {
|
||||
module.directive('heatmapOptions', function ($parse, $compile, getAppState) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
template: heatmapOptionsTemplate,
|
||||
replace: true,
|
||||
link: function ($scope) {
|
||||
$scope.isColorRangeOpen = false;
|
||||
$scope.customColors = false;
|
||||
|
||||
$scope.resetColors = () => {
|
||||
$scope.uiState.set('vis.colors', null);
|
||||
$scope.customColors = false;
|
||||
};
|
||||
|
||||
$scope.getGreaterThan = function (index) {
|
||||
if (index === 0) return -1;
|
||||
return $scope.vis.params.colorsRange[index - 1].value;
|
||||
};
|
||||
|
||||
$scope.getColor = function (index) {
|
||||
const colors = $scope.uiState.get('vis.colors');
|
||||
|
@ -31,8 +42,12 @@ module.directive('heatmapOptions', function ($parse, $compile) {
|
|||
});
|
||||
|
||||
$scope.uiState.on('colorChanged', () => {
|
||||
$scope.customColors = true;
|
||||
/*const appState = getAppState();
|
||||
$scope.realVis.params.colorSchema = 'custom';
|
||||
$scope.vis.params.colorSchema = 'custom';
|
||||
appState.vis.params.colorSchema = 'custom';
|
||||
appState.save();*/
|
||||
});
|
||||
}
|
||||
};
|
|
@ -3,7 +3,7 @@ import 'ui/vislib';
|
|||
import 'plugins/kbn_vislib_vis_types/controls/vislib_basic_options';
|
||||
import 'plugins/kbn_vislib_vis_types/controls/point_series_options';
|
||||
import 'plugins/kbn_vislib_vis_types/controls/line_interpolation_option';
|
||||
import 'plugins/kbn_vislib_vis_types/controls/heatmap_range_option';
|
||||
import 'plugins/kbn_vislib_vis_types/controls/heatmap_options';
|
||||
import VisSchemasProvider from 'ui/vis/schemas';
|
||||
import VisVisTypeProvider from 'ui/vis/vis_type';
|
||||
import AggResponsePointSeriesPointSeriesProvider from 'ui/agg_response/point_series/point_series';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue