axes_editor.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <div class="editor-row">
  2. <div class="section gf-form-group" ng-repeat="yaxis in ctrl.panel.yaxes">
  3. <h5 class="section-heading" ng-show="$index === 0">Left Y</h5>
  4. <h5 class="section-heading" ng-show="$index === 1">Right Y</h5>
  5. <gf-form-switch class="gf-form" label="Show" label-class="width-6" checked="yaxis.show" on-change="ctrl.render()"></gf-form-switch>
  6. <div ng-if="yaxis.show">
  7. <div class="gf-form">
  8. <label class="gf-form-label width-6">Unit</label>
  9. <div class="gf-form-dropdown-typeahead max-width-20" ng-model="yaxis.format" dropdown-typeahead2="ctrl.unitFormats" dropdown-typeahead-on-select="ctrl.setUnitFormat(yaxis, $subItem)"></div>
  10. </div>
  11. </div>
  12. <div class="gf-form">
  13. <label class="gf-form-label width-6">Scale</label>
  14. <div class="gf-form-select-wrapper max-width-20">
  15. <select class="gf-form-input" ng-model="yaxis.logBase" ng-options="v as k for (k, v) in ctrl.logScales" ng-change="ctrl.render()"></select>
  16. </div>
  17. </div>
  18. <div class="gf-form-inline">
  19. <div class="gf-form">
  20. <label class="gf-form-label width-6">Y-Min</label>
  21. <input type="text" class="gf-form-input width-5" placeholder="auto" empty-to-null ng-model="yaxis.min" ng-change="ctrl.render()" ng-model-onblur>
  22. </div>
  23. <div class="gf-form">
  24. <label class="gf-form-label width-6">Y-Max</label>
  25. <input type="text" class="gf-form-input width-5" placeholder="auto" empty-to-null ng-model="yaxis.max" ng-change="ctrl.render()" ng-model-onblur>
  26. </div>
  27. </div>
  28. <div ng-if="yaxis.show">
  29. <div class="gf-form">
  30. <label class="gf-form-label width-6">Decimals</label>
  31. <input type="number" class="gf-form-input max-width-20" placeholder="auto" empty-to-null bs-tooltip="'Override automatic decimal precision for y-axis'" data-placement="right" ng-model="yaxis.decimals" ng-change="ctrl.render()" ng-model-onblur>
  32. </div>
  33. <div class="gf-form">
  34. <label class="gf-form-label width-6">Label</label>
  35. <input type="text" class="gf-form-input max-width-20" ng-model="yaxis.label" ng-change="ctrl.render()" ng-model-onblur>
  36. </div>
  37. </div>
  38. </div>
  39. <div class="section gf-form-group">
  40. <h5 class="section-heading">X-Axis</h5>
  41. <gf-form-switch class="gf-form" label="Show" label-class="width-6" checked="ctrl.panel.xaxis.show" on-change="ctrl.render()"></gf-form-switch>
  42. <div class="gf-form">
  43. <label class="gf-form-label width-6">Mode</label>
  44. <div class="gf-form-select-wrapper max-width-15">
  45. <select class="gf-form-input" ng-model="ctrl.panel.xaxis.mode" ng-options="v as k for (k, v) in ctrl.xAxisModes" ng-change="ctrl.xAxisModeChanged()"> </select>
  46. </div>
  47. </div>
  48. <!-- Series mode -->
  49. <div class="gf-form" ng-if="ctrl.panel.xaxis.mode === 'series'">
  50. <label class="gf-form-label width-6">Value</label>
  51. <metric-segment-model property="ctrl.panel.xaxis.values[0]" options="ctrl.xAxisStatOptions" on-change="ctrl.xAxisValueChanged()" custom="false" css-class="width-10" select-mode="true"></metric-segment-model>
  52. </div>
  53. <!-- Histogram mode -->
  54. <div class="gf-form" ng-if="ctrl.panel.xaxis.mode === 'histogram'">
  55. <label class="gf-form-label width-6">Buckets</label>
  56. <input type="number" class="gf-form-input max-width-8" ng-model="ctrl.panel.xaxis.buckets" placeholder="auto" ng-change="ctrl.render()" ng-model-onblur bs-tooltip="'Number of buckets'" data-placement="right">
  57. </div>
  58. <div>
  59. <br/>
  60. <h5 class="section-heading">Y-Axes</h5>
  61. <gf-form-switch class="gf-form" label="Align" tooltip="Align left and right Y-axes" label-class="width-6" switch-class="width-5" checked="ctrl.panel.yaxis.align" on-change="ctrl.render()"></gf-form-switch>
  62. <div class="gf-form" ng-show="ctrl.panel.yaxis.align">
  63. <label class="gf-form-label width-6">
  64. Level
  65. </label>
  66. <input type="number" class="gf-form-input width-5" placeholder="0" ng-model="ctrl.panel.yaxis.alignLevel" ng-change="ctrl.render()" ng-model-onblur bs-tooltip="'Alignment of Y-axes are based on this value, starting from Y=0'" data-placement="right">
  67. </div>
  68. </div>
  69. </div>
  70. </div>