cabana: plot axes labels no longer cut off when signal value significantly increases

main
Andy Haden 2017-07-20 16:06:14 -07:00
parent e54897495e
commit 5349aab1b8
2 changed files with 9 additions and 6 deletions

View File

@ -88,9 +88,13 @@ export default class CanGraph extends Component {
}
}
return JSON.stringify(this.state) !== JSON.stringify(nextState)
|| this.visualChanged(this.props, nextProps)
|| this.dataChanged(this.props, nextProps);
const dataChanged = this.dataChanged(this.props, nextProps);
if(dataChanged) {
this.view.run();
}
return dataChanged
|| JSON.stringify(this.state) !== JSON.stringify(nextState)
|| this.visualChanged(this.props, nextProps);
}
componentDidUpdate(prevProps, prevState) {

View File

@ -4,7 +4,8 @@ export default createClassFromSpec('CanPlot', {
"$schema": "https://vega.github.io/schema/vega/v3.0.json",
"width": 500,
"height": 200,
"padding": 5,
"padding": "auto",
"autosize": {"type": "pad", "resize": true},
"signals": [
{
"name": "tipTime",
@ -98,8 +99,6 @@ export default createClassFromSpec('CanPlot', {
"interactive": true,
"encode": {
"enter": {
"width": {"value": 500},
"height": {"value": 200},
"fill": {"value": "transparent"}
}
},