only allow to rotate labels by 90 degrees

This commit is contained in:
ppisljar 2016-12-09 19:11:02 +01:00
parent 9b0f4aa37e
commit 26bd2e97a5
2 changed files with 5 additions and 6 deletions

View file

@ -148,12 +148,7 @@
Rotate
</label>
<div class="kuiSideBarFormRow__control">
<input
id="rotateLabels"
class="kuiInput kuiSideBarInput"
type="number"
ng-model="vis.params.valueAxes[0].labels.rotate"
>
<input class="kuiCheckBox" id="rotateLabels" type="checkbox" ng-model="rotateLabels">
</div>
</div>
</div>

View file

@ -12,6 +12,10 @@ module.directive('heatmapOptions', function ($parse, $compile, getAppState) {
$scope.isColorRangeOpen = true;
$scope.customColors = false;
$scope.$watch('rotateLabels', rotate => {
$scope.vis.params.valueAxes[0].labels.rotate = rotate ? 270 : 0;
});
$scope.resetColors = () => {
$scope.uiState.set('vis.colors', null);
$scope.customColors = false;