I have a PieChart
that needs a formatted label. Since some of the sectors are small I want to use Callout
for those but keep the label for the others.
This concept works for basic data.
assoc = <|"a" -> 1., "b" -> 2., "c" -> 5., "d" -> 3.|>;
PieChart[If[# < 2, Callout, Labeled][#, NumberForm[#, {2, 1}]] & /@ assoc]
However, when evaluated on some other Association
s the PieChart gives a FindMinimum
error and does not produce the expected result. None of the Callouts appear.
assoc2 = <|"a" -> 20.1230, "b" -> 0, "c" -> 0, "d" -> 0,
"e" -> 18.6519, "f" -> 32.9057, "g" -> 18.2365, "h" -> 1.2884,
"i" -> 5.9057, "j" -> 2.8403, "k" -> 0, "l" -> 0, "m" -> 0,
"n" -> 1.8480, "o" -> 0|>;
PieChart[If[# < 2, Callout, Labeled][#, NumberForm[#, {2, 1}]] & /@ assoc2]
FindMinimum::eqineq: Constraints in {False} are not all equality or inequality constraints. With the exception of integer domain constraints for linear programming, domain constraints or constraints with Unequal (!=) are not supported.
Is this a bug? Any ideas how to work around this? version 11.1.0 on Win 7 Ent
CASE: 3883154