# What purpose does using None in BarChart's ChartLabels option serve?

I am wondering how to describe the reasoning behind the None setting in ChartLabels to label a group of data. It's a very common way of using a bar chart but it wasn't immediately obvious from the help menu - I had to figure it out from other BarChart questions (very common).

I like in Mathematica that I can describe what I want and then translate that to the functions and settings (with some practice and vocab) - I can't figure out how to do it for this though.

The help menu says "None indicates no label. If there are more elements in a dataset than Subscript[lbl, i] specified, the subsequent Subscript[lbl, i] are taken to be None".

The default behaviour is to label each data point in the group with as many labels as needed or as many as you have - this is how I interpret the help description.

My question is: how would I have figured out that ChartLabels->{blah, None} would generate labels for each group of data? I hate memorising 'tricks' - is there an obvious way to describe this behaviour that makes adding None obvious?

{BarChart[
{{1, 2, 3}, {2, 3, 5}, {1, 5, 3}},
ChartLabels -> Range[3]],
BarChart[
{{1, 2, 3}, {2, 3, 5}, {1, 5, 3}},
ChartLabels -> {Range[2]}],
BarChart[
{{1, 2, 3}, {2, 3, 5}, {1, 5, 3}},
ChartLabels -> {Range[2], None}],
BarChart[
{{1, 2, 3}, {2, 3, 5}, {1, 5, 3}},
ChartLabels -> {Range[10], None}] (* at least 3 but mma ignores >3 *)}

• ChartLabels-> $\{spec_1, spec_2, \ldots\}$ uses the successive $spec_i$ to specify labels for successive dimensions in nested lists of datasets.
– kglr
Oct 3, 2018 at 23:47
• Thx! - I know it was a trivial question but I just couldn't see it... This helped clear it up for me: BarChart[ {{1, 2, 3}, {2, 3, 5}, {1, 5, 3}}, ChartLabels -> {Range[3], Range[3]}]
– Joe
Oct 4, 2018 at 0:12
• Joe, posted the comment as an answer.
– kglr
Oct 4, 2018 at 0:37

ChartLabels -> $$\{spec_1, spec_2, \ldots\}$$ uses the successive $$spec_i$$ to specify labels for successive dimensions in nested lists of datasets