Cleanup
parent
47e05de99a
commit
9bf7623270
|
@ -87,9 +87,8 @@ export default class Dygraph extends Component {
|
||||||
axes: {
|
axes: {
|
||||||
y: {
|
y: {
|
||||||
valueRange: getRange(timeSeries, y.bounds, ruleValues),
|
valueRange: getRange(timeSeries, y.bounds, ruleValues),
|
||||||
axisLabelFormatter: (yval, __, opts, d) => {
|
axisLabelFormatter: (yval, __, opts) =>
|
||||||
return numberValueFormatter(yval, opts, y.prefix, y.suffix)
|
numberValueFormatter(yval, opts, y.prefix, y.suffix),
|
||||||
},
|
|
||||||
axisLabelWidth: 60 + y.prefix.length * 7 + y.suffix.length * 7,
|
axisLabelWidth: 60 + y.prefix.length * 7 + y.suffix.length * 7,
|
||||||
},
|
},
|
||||||
y2: {
|
y2: {
|
||||||
|
@ -207,13 +206,6 @@ export default class Dygraph extends Component {
|
||||||
this.dygraph.resetZoom()
|
this.dygraph.resetZoom()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
|
||||||
this.props.axes.y.prefix !== nextProps.axes.y.prefix ||
|
|
||||||
this.props.axes.y.suffix !== nextProps.axes.y.suffix
|
|
||||||
) {
|
|
||||||
this.resize()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Will cause componentDidUpdate to fire twice, currently. This could
|
// Will cause componentDidUpdate to fire twice, currently. This could
|
||||||
// be reduced by returning false from within the reset conditional above,
|
// be reduced by returning false from within the reset conditional above,
|
||||||
// though that would be based on the assumption that props for timeRange
|
// though that would be based on the assumption that props for timeRange
|
||||||
|
|
Loading…
Reference in New Issue