Recently i am working with Apache POI with Spring Boot and i am facing an issue. I want to represent database connections between entities, and i have a problem with visualizing multiple connections.
So the basic problem of mine is separating connections.
Here is my starting: 1
You can't see but there is multiple connections between this two rectangles, but because of the same start and end point, they are uncover each others.
The generated XML-code is the following:
<p:cxnSp>
<p:nvCxnSpPr>
<p:cNvPr name="Connector 7" id="7" />
<p:cNvCxnSpPr>
<a:stCxn id="2" idx="3" />
<a:endCxn id="3" idx="1" />
</p:cNvCxnSpPr>
<p:nvPr />
</p:nvCxnSpPr>
<p:spPr>
<a:xfrm flipV="1">
<a:off y="2199409" x="2616200" />
<a:ext cy="1318491" cx="2413000" />
</a:xfrm>
<a:prstGeom prst="curvedConnector3">
<a:avLst />
</a:prstGeom>
<a:ln w="9525">
<a:solidFill>
<a:srgbClr val="000000" />
</a:solidFill>
</a:ln>
</p:spPr>
</p:cxnSp>
So what i want to do is set the curved conectors midpoint in a different values, like in this image (i do this manually for the example): 2
I try to add some other GeomGuide element to the connector but the result is an unstable pptx file with this:
<a:prstGeom prst="curvedConnector3">
<a:avLst>
<a:gd name="adj1" fmla="val 57365" />
</a:avLst>
</a:prstGeom>
Relevant java code snippet for this:
XSLFConnectorShape connector1 = slide.createConnector();
CTNonVisualConnectorProperties cx = ctConnector.getNvCxnSpPr().getCNvCxnSpPr();
CTConnection start = cx.addNewStCxn();
start.setId(shapeIdStart);
start.setIdx(rel.getStartSide());
CTConnection end = cx.addNewEndCxn();
end.setId(shapeIdEnd);
end.setIdx(rel.getEndSide());
CTGeomGuideList ctGeomGuideList = ctConnector.getSpPr().getPrstGeom().getAvLst();
CTGeomGuide ctGeomGuide = ctGeomGuideList.addNewGd();
ctGeomGuide.setName("adj");
ctGeomGuide.setFmla("val 45000");