mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
Add more variety to the node heights
This commit is contained in:
@@ -3,7 +3,7 @@ import { tracked } from '@glimmer/tracking';
|
||||
import { action } from '@ember/object';
|
||||
import { run } from '@ember/runloop';
|
||||
import { scaleLinear } from 'd3-scale';
|
||||
import { max } from 'd3-array';
|
||||
import { extent } from 'd3-array';
|
||||
import RSVP from 'rsvp';
|
||||
|
||||
export default class TopoViz extends Component {
|
||||
@@ -40,8 +40,8 @@ export default class TopoViz extends Component {
|
||||
|
||||
// TODO: Make the range dynamic based on the extent of the domain
|
||||
this.heightScale = scaleLinear()
|
||||
.range([15, 30])
|
||||
.domain([0, max(this.args.nodes.map(node => node.resources.memory))]);
|
||||
.range([15, 40])
|
||||
.domain(extent(this.args.nodes.map(node => node.resources.memory)));
|
||||
this.isLoaded = true;
|
||||
|
||||
// schedule masonry
|
||||
|
||||
Reference in New Issue
Block a user