I just noticed this while running Istio 1.1. The graph generation code is looking at deployments for the labels (app/version) when it should be looking at the pods (or at least it should look at the deployments template metadata labels, not the deployment's own labels). This is because the Istio telemetry "app" and "version" data comes from the pod labels so we need to be consistent with that.
We were assuming that Deployment labels will match the labels that its pods will get, but this is not always true (there is no requirement that deployment labels must match those of its pods).
For example, Istio 1.1 has the following defined:
Notice the istio-policy Deployment itself has labels app=istio-mixer and version=1.0.0, but the pods it manages has app=policy and NO version label. So the labels of the Deployment itself have no bearing on what the pod labels are. But it is the pod labels that Istio telemetry captures (so in Prometheus, for the istio-policy pods, you'd see app of "policy" and version of "unknown".)
In Kiali, we are looking at the Deployment labels rather than the pod labels. We need to fix this. We will probably need to look at the Deployment's template metadata since many times the kiali server is looking up Deployments specifically, not pods, but the Deployment template metadata is where the deployment pods get their labels.