Skip to content

Commit

Permalink
Add option to disable zero filling. Closes #612. Closes #934
Browse files Browse the repository at this point in the history
  • Loading branch information
Rashid Khan committed Apr 10, 2014
1 parent 3813428 commit bea4b5e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/app/panels/histogram/editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ <h5>Transform Series</h5>
<div class="editor-option">
<label class="small">Derivative <tip>Plot the change per interval in the series</tip></label><input type="checkbox" ng-model="panel.derivative" ng-checked="panel.derivative" ng-change="set_refresh(true)">
</div>
<div class="editor-option">
<label class="small">Zero fill <tip>Fills zeros in gaps.</tip></label><input type="checkbox" ng-model="panel.zerofill" ng-checked="panel.zerofill" ng-change="set_refresh(true)">
</div>
</div>
<div class="section">
<h5>Time Options</h5>
Expand Down
3 changes: 2 additions & 1 deletion src/app/panels/histogram/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ function (angular, app, $, _, kbn, moment, timeSeries, numeral) {
/** @scratch /panels/histogram/3
* derivative:: Show each point on the x-axis as the change from the previous point
*/

derivative : false,
/** @scratch /panels/histogram/3
* tooltip object::
Expand Down Expand Up @@ -417,7 +418,7 @@ function (angular, app, $, _, kbn, moment, timeSeries, numeral) {
interval: _interval,
start_date: _range && _range.from,
end_date: _range && _range.to,
fill_style: $scope.panel.derivative ? 'null' : 'minimal'
fill_style: $scope.panel.derivative ? 'null' : $scope.panel.zerofill ? 'minimal' : 'no'
};
time_series = new timeSeries.ZeroFilled(tsOpts);
hits = 0;
Expand Down

0 comments on commit bea4b5e

Please sign in to comment.