mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-09 00:00:01 +01:00
Add proper margin to plot y-axis
This commit is contained in:
parent
7c7c7cfb3f
commit
b8f988e3d5
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue