Commit aa6cf0ac authored by Mike Greiling's avatar Mike Greiling

add option to hide the graph legend

parent 556b242c
...@@ -21,6 +21,11 @@ ...@@ -21,6 +21,11 @@
type: String, type: String,
required: true, required: true,
}, },
showLegend: {
type: Boolean,
required: false,
default: true,
},
documentationPath: { documentationPath: {
type: String, type: String,
required: true, required: true,
...@@ -159,6 +164,7 @@ ...@@ -159,6 +164,7 @@
:deployment-data="store.deploymentData" :deployment-data="store.deploymentData"
:project-path="projectPath" :project-path="projectPath"
:tags-path="tagsPath" :tags-path="tagsPath"
:show-legend="showLegend"
/> />
</graph-group> </graph-group>
</div> </div>
......
...@@ -52,6 +52,11 @@ ...@@ -52,6 +52,11 @@
type: String, type: String,
required: true, required: true,
}, },
showLegend: {
type: Boolean,
required: false,
default: true,
},
}, },
data() { data() {
...@@ -182,7 +187,9 @@ ...@@ -182,7 +187,9 @@
this.graphHeightOffset, this.graphHeightOffset,
); );
if (this.timeSeries.length > 3) { if (!this.showLegend) {
this.baseGraphHeight -= 60;
} else if (this.timeSeries.length > 3) {
this.baseGraphHeight = this.baseGraphHeight += (this.timeSeries.length - 3) * 20; this.baseGraphHeight = this.baseGraphHeight += (this.timeSeries.length - 3) * 20;
} }
...@@ -246,6 +253,7 @@ ...@@ -246,6 +253,7 @@
transform="translate(70, 20)" transform="translate(70, 20)"
/> />
<graph-legend <graph-legend
v-if="showLegend"
:graph-width="graphWidth" :graph-width="graphWidth"
:graph-height="graphHeight" :graph-height="graphHeight"
:margin="margin" :margin="margin"
......
...@@ -10,7 +10,7 @@ export default () => { ...@@ -10,7 +10,7 @@ export default () => {
el, el,
render(createElement) { render(createElement) {
return createElement(Dashboard, { return createElement(Dashboard, {
props: el.dataset, props: { ...el.dataset, showLegend: false },
}); });
}, },
}); });
......
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