Commit 53f724f6 by Torkel Ödegaard

legend aligns with left or right y axis depending on axis afinity

parent 74ad7bb0
......@@ -4,6 +4,11 @@
<div class="grafana-target-inner-wrapper">
<div class="grafana-target-inner">
<ul class="grafana-target-controls">
<li ng-if="target.yaxis">
<a class="pointer" ng-click="setYAxis()">
y&sup2;
</a>
</li>
<li>
<a class="pointer" tabindex="1" ng-click="showTextEditor = !showTextEditor">
<i class="icon-pencil"></i>
......
......@@ -95,14 +95,14 @@ function ($, RQ, _, config) {
var found = targets[0];
for (var i = 0; i < targets.length; i++) {
if (targets[i].target == graphiteTargetStr) {
if (targets[i].target === graphiteTargetStr) {
found = targets[i];
break;
}
if(targets[i].target.match("'" + graphiteTargetStr + "'")) {
found = targets[i];
}
};
}
return found;
}
......
......@@ -88,7 +88,10 @@
</div>
<div class="grafana-legend-container">
<span ng-show="panel.legend" ng-repeat='series in legend' class="histogram-legend">
<span ng-show="panel.legend"
ng-class="{'pull-right': series.yaxis === 2}"
ng-repeat='series in legend'
class="histogram-legend">
<i class='icon-circle' ng-style="{color: series.color}"></i>
<span class='small histogram-legend-item'>
<span ng-if="panel.show_query">{{series.alias || series.query}}</span>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -84,10 +84,13 @@
}
.grafana-legend-container {
text-align: center;
margin: 4px 15px;
text-align: left;
}
.panel-full-edit-tabs {
margin-top: 10px;
.nav-tabs > li > a {
line-height: 15px;
padding-top: 6px;
......@@ -159,10 +162,11 @@
}
.grafana-target-controls {
width: 90px;
width: 120px;
float: right;
list-style: none;
margin: 0;
text-align: right;
>li {
display: inline-block;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment