From b8f988e3d554163343178a0a52e980b3afa39015 Mon Sep 17 00:00:00 2001 From: Markus Grigull Date: Fri, 4 May 2018 13:03:26 +0200 Subject: [PATCH 1/2] Add proper margin to plot y-axis --- src/components/widget-plot/plot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/widget-plot/plot.js b/src/components/widget-plot/plot.js index 702940d..a8e03f2 100644 --- a/src/components/widget-plot/plot.js +++ b/src/components/widget-plot/plot.js @@ -149,7 +149,7 @@ class Plot extends React.Component { // create scale functions for both axes const xScale = scaleTime().domain([Date.now() - this.props.time * 1000, Date.now()]).range([0, this.props.width - leftMargin - this.state.labelMargin - rightMargin]); - const yScale = scaleLinear().domain(yRange).range([this.props.height - bottomMargin, 0]); + const yScale = scaleLinear().domain(yRange).range([this.props.height - bottomMargin, 5]); const xAxis = axisBottom().scale(xScale).ticks(5).tickFormat(date => timeFormat("%M:%S")(date)); const yAxis = axisLeft().scale(yScale).ticks(5); From eaa84207a272644428aa9b6c41835e6279bebdf6 Mon Sep 17 00:00:00 2001 From: Markus Grigull Date: Fri, 4 May 2018 13:05:49 +0200 Subject: [PATCH 2/2] Add spacing between table-plot buttons and plot axis --- src/styles/widgets.css | 1 + 1 file changed, 1 insertion(+) diff --git a/src/styles/widgets.css b/src/styles/widgets.css index e1f16ca..e364a81 100644 --- a/src/styles/widgets.css +++ b/src/styles/widgets.css @@ -155,6 +155,7 @@ div[class*="-widget"] .btn[disabled], .btn.disabled, div[class*="-widget"] input display: flex; flex-direction: column; justify-content: center; + margin-right: 10px; } .plot-table-widget small {