mirror of
https://github.com/weaveworks/scope.git
synced 2026-08-18 03:46:45 +00:00
Revert "Graph layout optimizations"
This commit is contained in:
@@ -6,6 +6,7 @@ import { line, curveLinear } from 'd3-shape';
|
||||
import { scaleLinear } from 'd3-scale';
|
||||
|
||||
import { formatMetricSvg } from '../utils/string-utils';
|
||||
import { round } from '../utils/math-utils';
|
||||
|
||||
|
||||
export default class Sparkline extends React.Component {
|
||||
@@ -63,7 +64,7 @@ export default class Sparkline extends React.Component {
|
||||
const min = formatMetricSvg(d3Min(data, d => d.value), this.props);
|
||||
const max = formatMetricSvg(d3Max(data, d => d.value), this.props);
|
||||
const mean = formatMetricSvg(d3Mean(data, d => d.value), this.props);
|
||||
const title = `Last ${Math.round((lastDate - firstDate) / 1000)} seconds, ` +
|
||||
const title = `Last ${round((lastDate - firstDate) / 1000)} seconds, ` +
|
||||
`${data.length} samples, min: ${min}, max: ${max}, mean: ${mean}`;
|
||||
|
||||
return {title, lastX, lastY, data};
|
||||
|
||||
Reference in New Issue
Block a user