Merge pull request #110 from thingsboard/bug/TB-52
TB-52: Fix improper legend values selection/deselection for multiple …
This commit is contained in:
commit
8e51b5eb34
@ -341,6 +341,7 @@ export default function WidgetController($scope, $timeout, $window, $element, $q
|
|||||||
$scope.legendConfig.showTotal === true);
|
$scope.legendConfig.showTotal === true);
|
||||||
|
|
||||||
if (widget.type !== types.widgetType.rpc.value && widget.type !== types.widgetType.static.value) {
|
if (widget.type !== types.widgetType.rpc.value && widget.type !== types.widgetType.static.value) {
|
||||||
|
var dataIndex = 0;
|
||||||
for (var i = 0; i < widgetContext.datasources.length; i++) {
|
for (var i = 0; i < widgetContext.datasources.length; i++) {
|
||||||
var datasource = widgetContext.datasources[i];
|
var datasource = widgetContext.datasources[i];
|
||||||
for (var a = 0; a < datasource.dataKeys.length; a++) {
|
for (var a = 0; a < datasource.dataKeys.length; a++) {
|
||||||
@ -356,7 +357,7 @@ export default function WidgetController($scope, $timeout, $window, $element, $q
|
|||||||
if ($scope.displayLegend) {
|
if ($scope.displayLegend) {
|
||||||
var legendKey = {
|
var legendKey = {
|
||||||
dataKey: dataKey,
|
dataKey: dataKey,
|
||||||
dataIndex: Number(i) + Number(a)
|
dataIndex: dataIndex++
|
||||||
};
|
};
|
||||||
$scope.legendData.keys.push(legendKey);
|
$scope.legendData.keys.push(legendKey);
|
||||||
var legendKeyData = {
|
var legendKeyData = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user