Timeline for How-to ensure consistent legend when using PieChart?
Current License: CC BY-SA 3.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 26, 2016 at 22:18 | vote | accept | e.doroskevic | ||
May 26, 2016 at 20:27 | history | edited | kglr | CC BY-SA 3.0 |
deleted 10 characters in body
|
May 26, 2016 at 19:51 | comment | added | kglr | @Brett and N.J. Evans, thank you for the comments. I hope the updated version fixes the issue you mention. | |
May 26, 2016 at 19:47 | history | edited | kglr | CC BY-SA 3.0 |
added 98 characters in body
|
May 26, 2016 at 19:40 | comment | added | kglr | @N.J.Evans, thank you. I will update with a fix. | |
May 26, 2016 at 19:30 | comment | added | Brett Champion | I think all the code should be checked carefully as to whether green is true or false... | |
May 26, 2016 at 19:28 | comment | added | N.J.Evans |
This fails in the case that n=1 and RandomChoice returns True. Since Tally only returns an entry for True, your ChartStyle applies Green to the True value, even though the legend is correct.
|
|
May 26, 2016 at 18:55 | history | edited | kglr | CC BY-SA 3.0 |
added 376 characters in body
|
May 26, 2016 at 18:49 | comment | added | Brett Champion |
You can also pass the SwatchLegend to ChartLegends: ChartLegends -> SwatchLegend[{Green, Red}, {True, False}]
|
|
May 26, 2016 at 16:47 | history | answered | kglr | CC BY-SA 3.0 |