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

add yAxis force percent scale in histogram #161

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
23 changes: 14 additions & 9 deletions panels/histogram/editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,28 +65,33 @@ <h5>Chart Options</h5>
<select class="input-mini" ng-model="panel.linewidth" ng-options="f for f in [0,1,2,3,4,5,6,7,8,9,10]"></select>
</div>
</div>
<div class="row-fluid">
<div class="row-fluid">
<div class="span2">
<label class="small">Time correction</label>
<label class="small">Time correction</label>
<select ng-model="panel.timezone" class='input-small' ng-options="f for f in ['browser','utc']"></select>
</div>
<div class="span1"> <label class="small">Selectable</label><input type="checkbox" ng-model="panel.interactive" ng-checked="panel.interactive"></div>
<div class="span2">
<div class="span2">
<label class="small">Zoom Links</label><input type="checkbox" ng-model="panel.zoomlinks" ng-checked="panel.zoomlinks" />
</div>
<div class="span2">
<label class="small">Auto-interval</label><input type="checkbox" ng-model="panel.auto_int" ng-checked="panel.auto_int" />
<div class="span2">
<label class="small">yAxis Percent</label><input type="checkbox" ng-model="panel.ypercent" ng-checked="panel.ypercent" />
</div>
</div>
<div class="row-fluid">
<div class="span2">
<label class="small">xAxis Auto-interval</label><input type="checkbox" ng-model="panel.auto_int" ng-checked="panel.auto_int" />
</div>
<div class="span2" ng-show='panel.auto_int'>
<div class="span2" ng-show='panel.auto_int'>
<label class="small">Resolution</label><input type="number" class='input-mini' ng-model="panel.resolution" ng-change='set_refresh(true)'/>
</div>
<div class="span3" ng-show='panel.auto_int'>
<div class="span2" ng-show='panel.auto_int'>
<label class="small">Shoot for this many data points, rounding to sane intervals</label>
</div>
<div class="span2" ng-hide='panel.auto_int'>
<div class="span2" ng-hide='panel.auto_int'>
<label class="small">Interval</label><input type="text" class='input-mini' ng-model="panel.interval" ng-change='set_refresh(true)'/>
</div>
<div class="span3" ng-hide='panel.auto_int'>
<div class="span2" ng-hide='panel.auto_int'>
<label class="small">Use Elasticsearch date math format (eg 1m, 5m, 1d, 2w, 1y)</label>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions panels/histogram/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ angular.module('kibana.histogram', [])
yaxis: {
show: scope.panel['y-axis'],
min: 0,
max: scope.panel.percentage && scope.panel.stack ? 100 : null,
max: scope.panel.ypercent ? 100 : (scope.panel.percentage && scope.panel.stack ? 100 : null),
color: "#c8c8c8"
},
xaxis: {
Expand Down Expand Up @@ -393,4 +393,4 @@ angular.module('kibana.histogram', [])
});
}
};
})
})