How can I highlight a single bar?

Eugene Manuilov edited this page Mar 19, 2014 · 2 revisions

Sometimes it happens that we need to emphasize specific bar on a chart and it looks like we don’t have ability to do it via chart settings… It’s true, but only from one side. From another side we can use small trick which will help us to achieve what we need.

Prepare your data

The first thing which we have to do is to prepare our data. Lets assume we have a chart with one series, and it’s data could look like this:

Year	|   Austria
string	|   number
2003	|   1336060
2004	|   1538156
2005	|   1576579
2006	|   1600652
2007	|   1968113
2008	|   1901067

For example we want to highlight a value for 2006 year. In this case we need to add one more column with the same title and type as the first series, but with empty values:

Year	|   Austria	|   Austria
string	|   number	|   number
2003	|   1336060	|   
2004	|   1538156	|   
2005	|   1576579	|   
2006	|   1600652	|   
2007	|   1968113	|   
2008	|   1901067	|   

And move selected value from the first series to the second one:

Year	|   Austria	|   Austria
string	|   number	|   number
2003	|   1336060	|   
2004	|   1538156	|   
2005	|   1576579	|   
2006	|               |   1600652
2007	|   1968113	|   
2008	|   1901067	|   

After doing, save your CSV file and that’s all for data modifications.

Setup chart

The second step is to setup the chart settings. To do it create new chart or edit existing one, upload prepared CSV file and go to chart settings screen. Here we need to set “Is Stacked” option to “Yes” and remove the second series from legend by setting “Visible In Legend” option to “No” in the appropriate series settings under “Series Settings” group. That’s all. Save the chart and embed it in a page.