mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
began on being able to control fill style per series
This commit is contained in:
parent
903dfc615c
commit
ee8ba469dd
@ -18,13 +18,19 @@
|
||||
<script type="text/ng-template" id="colorPopup.html">
|
||||
<div class="histogram-legend-popover">
|
||||
<div class="histogram-legend-popover-header">
|
||||
<a class="small" ng-click="toggleYAxis(series)">
|
||||
Toggle Y-axis (y²)
|
||||
</a>
|
||||
|
||||
<a class="close" ng-click="dismiss();" href="">×</a>
|
||||
</div>
|
||||
|
||||
<div class="editor-row">
|
||||
<a class="small" ng-click="toggleYAxis(series)">
|
||||
2:nd Y-axis (y²) <input type="checkbox"></input>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="editor-row">
|
||||
Fill style <select class="input-mini" ng-model="panel.aliasFillStyle[series.alias]" ng-options="f for f in ['no', 'all', 'null']" ng-change="get_data()"></select>
|
||||
</div>
|
||||
|
||||
<div class="editor-row">
|
||||
<i ng-repeat="color in colors"
|
||||
class="pointer"
|
||||
|
@ -217,7 +217,8 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
|
||||
targets: [],
|
||||
|
||||
aliasColors: {},
|
||||
aliasYAxis: {}
|
||||
aliasYAxis: {},
|
||||
aliasFillStyle: {}
|
||||
};
|
||||
|
||||
_.defaults($scope.panel,_d);
|
||||
@ -338,15 +339,18 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
|
||||
if(results.length === 0 ) {
|
||||
return [];
|
||||
}
|
||||
|
||||
var tsOpts = {
|
||||
interval: $scope.interval,
|
||||
start_date: $scope.range && $scope.range.from,
|
||||
end_date: $scope.range && $scope.range.to,
|
||||
fill_style: 'no'
|
||||
};
|
||||
|
||||
_.each(results, function(targetData) {
|
||||
var alias = targetData.target;
|
||||
var color = $scope.panel.aliasColors[alias] || $scope.colors[data.length];
|
||||
var yaxis = $scope.panel.aliasYAxis[alias] || 1;
|
||||
|
||||
var tsOpts = {
|
||||
interval: $scope.interval,
|
||||
start_date: $scope.range && $scope.range.from,
|
||||
end_date: $scope.range && $scope.range.to,
|
||||
fill_style: $scope.panel.aliasFillStyle[alias] || 'no',
|
||||
};
|
||||
|
||||
var time_series = new timeSeries.ZeroFilled(tsOpts);
|
||||
|
||||
_.each(targetData.datapoints, function(valueArray) {
|
||||
@ -355,10 +359,6 @@ function (angular, app, $, _, kbn, moment, timeSeries) {
|
||||
}
|
||||
});
|
||||
|
||||
var alias = targetData.target;
|
||||
var color = $scope.panel.aliasColors[alias] || $scope.colors[data.length];
|
||||
var yaxis = $scope.panel.aliasYAxis[alias] || 1;
|
||||
|
||||
var seriesInfo = {
|
||||
alias: alias,
|
||||
color: color,
|
||||
|
@ -1,6 +1,6 @@
|
||||
/** @scratch /configuration/config.js/1
|
||||
* == Configuration
|
||||
* config.js is where you will find the core Kibana configuration. This file contains parameter that
|
||||
* config.js is where you will find the core Grafana configuration. This file contains parameter that
|
||||
* must be set before kibana is run for the first time.
|
||||
*/
|
||||
define(['settings'],
|
||||
@ -16,13 +16,15 @@ function (Settings) {
|
||||
* ==== elasticsearch
|
||||
*
|
||||
* The URL to your elasticsearch server. You almost certainly don't
|
||||
* want +http://localhost:9200+ here. Even if Kibana and Elasticsearch are on
|
||||
* want +http://localhost:9200+ here. Even if Grafana and Elasticsearch are on
|
||||
* the same host. By default this will attempt to reach ES at the same host you have
|
||||
* kibana installed on. You probably want to set it to the FQDN of your
|
||||
* Grafana installed on. You probably want to set it to the FQDN of your
|
||||
* elasticsearch host
|
||||
*/
|
||||
elasticsearch: "http://"+window.location.hostname+":9200",
|
||||
|
||||
graphiteUrl: "http://"+window.location.hostname+":8080",
|
||||
|
||||
/** @scratch /configuration/config.js/5
|
||||
* ==== default_route
|
||||
*
|
||||
@ -35,12 +37,13 @@ function (Settings) {
|
||||
default_route : '/dashboard/file/default.json',
|
||||
|
||||
/** @scratch /configuration/config.js/5
|
||||
* ==== kibana-int
|
||||
* ==== Grafana-int
|
||||
*
|
||||
* The default ES index to use for storing Kibana specific object
|
||||
* The default ES index to use for storing Grafana specific object
|
||||
* such as stored dashboards
|
||||
*/
|
||||
kibana_index: "kibana-int",
|
||||
grafana_index: "grafana-int",
|
||||
|
||||
/** @scratch /configuration/config.js/5
|
||||
* ==== panel_name
|
||||
|
Loading…
Reference in New Issue
Block a user