protected void Legend <TV>(IAestheticMapping <T, TV> aes, Func <TV, Elements.IElement> element) { if (aes == null || !aes.Guide) { return; } var legend = legends.GetOrAdd(aes); var n = aes.Labels.Count(); for (int i = 0; i < n; i++) { var(value, label) = aes.Labels.ElementAt(i); legend.Add(label, element(value)); } }