add option to hide the graph legend

上级 76b65bb2
......@@ -21,6 +21,11 @@
type: String,
required: true,
},
showLegend: {
type: Boolean,
required: false,
default: true,
},
documentationPath: {
type: String,
required: true,
......@@ -159,6 +164,7 @@
:deployment-data="store.deploymentData"
:project-path="projectPath"
:tags-path="tagsPath"
:show-legend="showLegend"
/>
</graph-group>
</div>
......
......@@ -52,6 +52,11 @@
type: String,
required: true,
},
showLegend: {
type: Boolean,
required: false,
default: true,
},
},
data() {
......@@ -182,7 +187,9 @@
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;
}
......@@ -246,6 +253,7 @@
transform="translate(70, 20)"
/>
<graph-legend
v-if="showLegend"
:graph-width="graphWidth"
:graph-height="graphHeight"
:margin="margin"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册