edgesSource.edgeCreator.styleProvider = (
  connectionData: ConnectionData
): PolylineEdgeStyle => {
  if (connectionData.ownership) {
    return new PolylineEdgeStyle({
      stroke: new Stroke({
        fill: connectionData.ownership > 50 ? red : 'black',
        thickness: 3
      })
    })
  } else {
    return new PolylineEdgeStyle({
      stroke: new Stroke({ fill: gray, thickness: 3, dashStyle: 'dash' })
    })
  }
}