UI: minor fixes/improvements.
This commit is contained in:
parent
3a7b1ebf7c
commit
067545b06b
@ -277,6 +277,7 @@ export default class Subscription {
|
||||
var datasource = this.datasources[i];
|
||||
for (var a = 0; a < datasource.dataKeys.length; a++) {
|
||||
var dataKey = datasource.dataKeys[a];
|
||||
dataKey.hidden = false;
|
||||
dataKey.pattern = angular.copy(dataKey.label);
|
||||
var datasourceData = {
|
||||
datasource: datasource,
|
||||
@ -290,7 +291,6 @@ export default class Subscription {
|
||||
dataKey: dataKey,
|
||||
dataIndex: dataIndex++
|
||||
};
|
||||
legendKey.dataKey.hidden = false;
|
||||
this.legendData.keys.push(legendKey);
|
||||
var legendKeyData = {
|
||||
min: null,
|
||||
|
||||
@ -437,11 +437,15 @@ function Utils($mdColorPalette, $rootScope, $window, $translate, $q, $timeout, t
|
||||
name: keyInfo.name,
|
||||
type: type,
|
||||
label: label,
|
||||
color: genNextColor(datasources),
|
||||
funcBody: keyInfo.funcBody,
|
||||
settings: {},
|
||||
_hash: Math.random()
|
||||
}
|
||||
if (keyInfo.color) {
|
||||
dataKey.color = keyInfo.color;
|
||||
} else {
|
||||
dataKey.color = genNextColor(datasources);
|
||||
}
|
||||
return dataKey;
|
||||
}
|
||||
|
||||
|
||||
@ -155,7 +155,7 @@ export default class TbFlot {
|
||||
var options = {
|
||||
title: null,
|
||||
subtitle: null,
|
||||
shadowSize: settings.shadowSize || 4,
|
||||
shadowSize: angular.isDefined(settings.shadowSize) ? settings.shadowSize : 4,
|
||||
HtmlText: false,
|
||||
grid: {
|
||||
hoverable: true,
|
||||
@ -235,6 +235,12 @@ export default class TbFlot {
|
||||
if (settings.grid.horizontalLines === false) {
|
||||
this.yaxis.tickLength = 0;
|
||||
}
|
||||
if (angular.isDefined(settings.grid.margin)) {
|
||||
options.grid.margin = settings.grid.margin;
|
||||
}
|
||||
if (angular.isDefined(settings.grid.minBorderMargin)) {
|
||||
options.grid.minBorderMargin = settings.grid.minBorderMargin;
|
||||
}
|
||||
}
|
||||
|
||||
options.crosshair = {
|
||||
@ -327,6 +333,10 @@ export default class TbFlot {
|
||||
show: this.chartType === 'line' ? keySettings.showLines !== false : keySettings.showLines === true
|
||||
};
|
||||
|
||||
if (angular.isDefined(keySettings.lineWidth)) {
|
||||
series.lines.lineWidth = keySettings.lineWidth;
|
||||
}
|
||||
|
||||
series.points = {
|
||||
show: false,
|
||||
radius: 8
|
||||
@ -446,7 +456,7 @@ export default class TbFlot {
|
||||
hidden = hidden && yaxis.keysInfo[k].hidden;
|
||||
}
|
||||
}
|
||||
yaxis.hidden = hidden
|
||||
yaxis.hidden = hidden;
|
||||
var newIndex = -1;
|
||||
if (!yaxis.hidden) {
|
||||
this.options.yaxes.push(yaxis);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user