From 9077b01fb989384017219a7e37919e93073e3db1 Mon Sep 17 00:00:00 2001 From: Arik Fraimovich Date: Tue, 19 May 2015 22:15:08 +0300 Subject: [PATCH] Feature: ability to disable x axis labels --- rd_ui/app/scripts/visualizations/chart.js | 9 ++++++--- rd_ui/app/views/visualizations/chart_editor.html | 8 ++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/rd_ui/app/scripts/visualizations/chart.js b/rd_ui/app/scripts/visualizations/chart.js index ff55943f4c..440c3ce2df 100644 --- a/rd_ui/app/scripts/visualizations/chart.js +++ b/rd_ui/app/scripts/visualizations/chart.js @@ -112,9 +112,6 @@ scope.columnTypes = { "X": "x", -// "X (Date time)": "x", -// "X (Linear)": "x-linear", -// "X (Category)": "x-category", "Y": "y", "Series": "series", "Unused": "unused" @@ -227,6 +224,12 @@ } }); + scope.visualization.options.xAxis = scope.visualization.options.xAxis || {}; + scope.visualization.options.xAxis.labels = scope.visualization.options.xAxis.labels || {}; + if (scope.visualization.options.xAxis.labels.enabled === undefined) { + scope.visualization.options.xAxis.labels.enabled = true; + } + scope.xAxisType = (scope.visualization.options.xAxis && scope.visualization.options.xAxis.type) || scope.xAxisType; xAxisUnwatch = scope.$watch("xAxisType", function (xAxisType) { diff --git a/rd_ui/app/views/visualizations/chart_editor.html b/rd_ui/app/views/visualizations/chart_editor.html index e758a062d0..4e2b62420f 100644 --- a/rd_ui/app/views/visualizations/chart_editor.html +++ b/rd_ui/app/views/visualizations/chart_editor.html @@ -54,6 +54,14 @@ ng-model="visualization.options.sortX"> +
+ + +
+ +
+