Make plot X axis start always line up (#9)
parent
fab47d1d61
commit
c7542bce59
|
@ -80,8 +80,8 @@ export default class CanGraph extends Component {
|
|||
this.setState({ bounds });
|
||||
|
||||
this.view.run();
|
||||
this.view.signal("width", bounds.width);
|
||||
this.view.signal("height", 0.4 * bounds.width); // 5:2 aspect ratio
|
||||
this.view.signal("width", bounds.width - 70);
|
||||
this.view.signal("height", 0.4 * (bounds.width - 70)); // 5:2 aspect ratio
|
||||
this.view.run();
|
||||
}
|
||||
|
||||
|
|
|
@ -2,10 +2,14 @@ import { createClassFromSpec } from "react-vega";
|
|||
|
||||
export default createClassFromSpec("CanPlot", {
|
||||
$schema: "https://vega.github.io/schema/vega/v3.0.json",
|
||||
width: 500,
|
||||
width: 400,
|
||||
height: 200,
|
||||
padding: "auto",
|
||||
autosize: { type: "fit", resize: true },
|
||||
padding: {
|
||||
top: 5,
|
||||
left: 30,
|
||||
right: 5,
|
||||
bottom: 10
|
||||
},
|
||||
signals: [
|
||||
{
|
||||
name: "tipTime",
|
||||
|
|
Loading…
Reference in New Issue