diff --git a/modules/distribution/src/repository/jaggeryapps/iotserver/units/analiytics-graphs/public/css/graph.css b/modules/distribution/src/repository/jaggeryapps/iotserver/units/analiytics-graphs/public/css/graph.css index 0a79c8ae..20379121 100644 --- a/modules/distribution/src/repository/jaggeryapps/iotserver/units/analiytics-graphs/public/css/graph.css +++ b/modules/distribution/src/repository/jaggeryapps/iotserver/units/analiytics-graphs/public/css/graph.css @@ -25,7 +25,7 @@ opacity: 0.5; white-space: nowrap; margin-left: 3px; - bottom: 1px; + bottom: -17px; } /* annotations */ @@ -187,11 +187,6 @@ } .custom_slider { + top: 20px; left: 40px; -} - -.custom_x_axis { - position: relative; - left: 40px; - height: 40px; } \ No newline at end of file diff --git a/modules/distribution/src/repository/jaggeryapps/iotserver/units/analytics/public/js/graph_util.js b/modules/distribution/src/repository/jaggeryapps/iotserver/units/analytics/public/js/graph_util.js index e1af806e..038a8ad5 100644 --- a/modules/distribution/src/repository/jaggeryapps/iotserver/units/analytics/public/js/graph_util.js +++ b/modules/distribution/src/repository/jaggeryapps/iotserver/units/analytics/public/js/graph_util.js @@ -287,14 +287,12 @@ function drawLineGraph(graphId, chartDataRaw) { var chartDiv = "chart" + graphId; var sliderDiv = "slider" + graphId; - var x_axis = "x_axis" + graphId; var y_axis = "y_axis" + graphId; $(chartWrapperElmId).html("").html('
'); var graphConfig = { @@ -337,11 +335,8 @@ function drawLineGraph(graphId, chartDataRaw) { graph: graph }); - var xAxis = new Rickshaw.Graph.Axis.X({ - graph: graph, - orientation: 'bottom', - element: document.getElementById(x_axis), - tickFormat: graph.x.tickFormat() + var xAxis = new Rickshaw.Graph.Axis.Time({ + graph: graph }); xAxis.render(); @@ -379,14 +374,12 @@ function drawBarGraph(graphId, chartDataRaw) { var chartDiv = "chart" + graphId; var sliderDiv = "slider" + graphId; - var x_axis = "x_axis" + graphId; var y_axis = "y_axis" + graphId; $(chartWrapperElmId).html("").html('
'); var graphConfig = { @@ -426,11 +419,8 @@ function drawBarGraph(graphId, chartDataRaw) { graph.render(); - var xAxis = new Rickshaw.Graph.Axis.X({ - graph: graph, - orientation: 'bottom', - element: document.getElementById(x_axis), - tickFormat: graph.x.tickFormat() + var xAxis = new Rickshaw.Graph.Axis.Time({ + graph: graph }); xAxis.render();