Chart with Checkboxes

In this article, we will learn how to create a chart with checkboxes. Let's start by creating a simple chart with the data.

In this chart, the main product1 is the most important, which must always be shown, and the others are optional.

data table for checkboxes

Select the data and create a chart. Change the chart type to combo and make products 2 and 3 as line chart with secondary axis.

custom combination

Finally, the chart will look like this, and products 2 and 3 will have a secondary axis on the right. As it has different values than the main product, it is better to show it on the secondary axis. Now we will create the checkboxes to show and unshow product 2 and product 3, as these are optional.

Let's define two names: series1 and series2 as follows.

define name of checkboxes data set

Here is how to define the first name:

define first name

And the second one:

define second name

In cells F2 and F3, enter the following values as TRUE:

enter boolean values

Create a checkbox and format controls as follows:

Create checkboxes and format controls

Link series to series names created:

edit series of check box chart

We can now remove and re-add products 2 and 3 to the list using checkboxes.

chart with checkboxes

Further reading: 
How to Add Dynamic Range to Chart? 
How to Break Chart’s column? 
Check box
Chart with option buttons
How to insert Box and Whisker in Excel