Commit 44b8348d authored by Mike Greiling's avatar Mike Greiling

add ability to override graph size measurements

parent ab9ad2db
...@@ -26,6 +26,11 @@ ...@@ -26,6 +26,11 @@
required: false, required: false,
default: true, default: true,
}, },
forceSmallGraph: {
type: Boolean,
required: false,
default: false,
},
documentationPath: { documentationPath: {
type: String, type: String,
required: true, required: true,
...@@ -165,6 +170,7 @@ ...@@ -165,6 +170,7 @@
:project-path="projectPath" :project-path="projectPath"
:tags-path="tagsPath" :tags-path="tagsPath"
:show-legend="showLegend" :show-legend="showLegend"
:small-graph="forceSmallGraph"
/> />
</graph-group> </graph-group>
</div> </div>
......
...@@ -57,6 +57,11 @@ ...@@ -57,6 +57,11 @@
required: false, required: false,
default: true, default: true,
}, },
smallGraph: {
type: Boolean,
required: false,
default: false,
},
}, },
data() { data() {
...@@ -135,7 +140,7 @@ ...@@ -135,7 +140,7 @@
const breakpointSize = bp.getBreakpointSize(); const breakpointSize = bp.getBreakpointSize();
const query = this.graphData.queries[0]; const query = this.graphData.queries[0];
this.margin = measurements.large.margin; this.margin = measurements.large.margin;
if (breakpointSize === 'xs' || breakpointSize === 'sm') { if (this.smallGraph || breakpointSize === 'xs' || breakpointSize === 'sm') {
this.graphHeight = 300; this.graphHeight = 300;
this.margin = measurements.small.margin; this.margin = measurements.small.margin;
this.measurements = measurements.small; this.measurements = measurements.small;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment