diff --git a/src/diagrams/flowchart/flowRenderer.js b/src/diagrams/flowchart/flowRenderer.js
index 8c0d8fa28b..790436c9e4 100644
--- a/src/diagrams/flowchart/flowRenderer.js
+++ b/src/diagrams/flowchart/flowRenderer.js
@@ -192,7 +192,7 @@ exports.addEdges = function (edges, g) {
var edgeText = edge.text.replace(/
/g, '\n');
if(typeof edge.style === 'undefined'){
if (conf.htmlLabels){
- g.setEdge(edge.start, edge.end,{labelType: 'html',style: style, labelpos:'c', label: ''+edge.text+'', arrowheadStyle: 'fill: #333', arrowhead: aHead},cnt);
+ g.setEdge(edge.start, edge.end,{labelType: 'html',style: style, labelpos:'c', label: ''+edge.text+'', arrowheadStyle: 'fill: #333', arrowhead: aHead},cnt);
}else{
g.setEdge(edge.start, edge.end,{labelType: 'text', style: 'stroke: #333; stroke-width: 1.5px;fill:none', labelpos:'c', label: edgeText, arrowheadStyle: 'fill: #333', arrowhead: aHead},cnt);
}
diff --git a/src/less/default/flow.less b/src/less/default/flow.less
index f866d72c36..3d999bd8a8 100644
--- a/src/less/default/flow.less
+++ b/src/less/default/flow.less
@@ -11,8 +11,12 @@
.edgePath .path {
stroke: @lineColor;
-
}
+
+.edgeLabel {
+ background-color: @edgeLabelBackground;
+}
+
.cluster rect{
fill: @secondBkg !important;
rx:4 !important;
diff --git a/src/less/default/variables.less b/src/less/default/variables.less
index 1429392f8d..0634374ca9 100644
--- a/src/less/default/variables.less
+++ b/src/less/default/variables.less
@@ -15,6 +15,8 @@
@titleColor: #333;
+@edgeLabelBackground: #e8e8e8;
+
/* Sequence Diagram variables */
@actorBorder: @border1;
@actorBkg: @mainBkg;
diff --git a/src/less/forest/flow.less b/src/less/forest/flow.less
index 7341860059..47e8de05ff 100644
--- a/src/less/forest/flow.less
+++ b/src/less/forest/flow.less
@@ -15,8 +15,12 @@ color:#333
.edgePath .path {
stroke: @lineColor;
stroke-width: 1.5px;
-
}
+
+.edgeLabel {
+ background-color: @edgeLabelBackground;
+}
+
.cluster rect{
fill: @secondBkg !important;
rx:4 !important;
diff --git a/src/less/forest/variables.less b/src/less/forest/variables.less
index fd72c8699e..8bfcdceb54 100644
--- a/src/less/forest/variables.less
+++ b/src/less/forest/variables.less
@@ -16,6 +16,8 @@
@titleColor: #333;
+@edgeLabelBackground: #e8e8e8;
+
/* Sequence Diagram variables */
@actorBorder: @border1;
@actorBkg: @mainBkg;