4
$\begingroup$

I was unsure about the best wording for the title if someone has a better suggestion please edit.

With V10 or V11 on OS X if you evaluate the following (with PerformanceGoal->"Quality"):

BarChart[{Range[50], Range[50]},ImageSize -> 600]

and

BarChart[{Range[49], Range[49]},ImageSize -> 600]

You will see that the dynamic tooltip and dynamic bar "highlighting" stop when you add the 50th bar. I'm assuming that this might be controlled by a SystemOption. Does anyone know what is controlling this behaviour and how this apparent cut-off can be modified?

enter image description here

$\endgroup$
3
  • $\begingroup$ Does BarChart[{Tooltip/@Range[50],Tooltip/@ Range[50]}, ...] work as expected? $\endgroup$
    – kglr
    Mar 27, 2017 at 2:54
  • $\begingroup$ perhaps related: Strange Behavior in Barchart LabelingFunction $\endgroup$
    – kglr
    Mar 27, 2017 at 3:14
  • $\begingroup$ @kglr that restores the tooltips but not the bar "highlighting". My interest is not in work arounds but in understanding what is driving the behaviour $\endgroup$ Mar 27, 2017 at 3:25

1 Answer 1

2
$\begingroup$

The limit is not controlled by any option. You can construct your own ChartElementFunction that has a mouseover effect:

BarChart[{Range[50], Range[50]}, ImageSize -> 600, 
 ChartElementFunction -> (Mouseover[
     Rectangle @@ Transpose[#], {EdgeForm[Opacity[0.25]], 
      Rectangle @@ Transpose[#]}] &)]
$\endgroup$
3
  • $\begingroup$ Thanks Brett. Does that mean the limitation is hard coded into the function code? $\endgroup$ Mar 28, 2017 at 2:27
  • 1
    $\begingroup$ Yes, the cutoff is when the total number of bars is more than 100. $\endgroup$ Mar 28, 2017 at 3:08
  • 1
    $\begingroup$ 100 might seem like plenty but these days with large monitors the cut off seems a bit low. Any reason why this couldn't be controlled in the future by a system option? $\endgroup$ Mar 28, 2017 at 4:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.