From 1a8579cd6db8e295c44c26ed3ac5699c7a1d2db6 Mon Sep 17 00:00:00 2001 From: carl bergquist Date: Fri, 11 Dec 2015 12:01:04 +0100 Subject: [PATCH] feat(table_panel): adds invert color order functionality --- public/app/panels/table/editor.html | 3 +++ public/app/panels/table/editor.ts | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/public/app/panels/table/editor.html b/public/app/panels/table/editor.html index 56b49a87567..0b13c61c884 100644 --- a/public/app/panels/table/editor.html +++ b/public/app/panels/table/editor.html @@ -132,6 +132,9 @@ +
  • + invert order +
  • diff --git a/public/app/panels/table/editor.ts b/public/app/panels/table/editor.ts index b9fc0c3dd63..978b37bc235 100644 --- a/public/app/panels/table/editor.ts +++ b/public/app/panels/table/editor.ts @@ -101,6 +101,14 @@ export class TablePanelEditorCtrl { }); }; + $scope.invertColorOrder = function(index) { + var ref = $scope.panel.styles[index].colors; + var copy = ref[0]; + ref[0] = ref[2]; + ref[2] = copy; + $scope.render(); + }; + } }