3

I want to have the following style on my chart border

border-radius: 4px;
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.1);
border: solid 1px #e1e1e1;

There is shadow property for the chart but it doesn't seem to work, can someone point out my mistake?

Thanks

Here is the jsfiddle

Edit: I want it to look like this

enter image description here

Jal
  • 2,174
  • 1
  • 18
  • 37

2 Answers2

4

Change shadow, offsetX and offsetY to a number instead of string:

Highcharts.chart('container', {
    chart: {
        shadow: {
            color: 'rgba(0, 0, 0, 0.1)',
            offsetX: 1,
            offsetY: 1,
            opacity: '0.1',
            width: 10
        }
    }
});

Updated Fiddle

ceferrari
  • 1,597
  • 1
  • 20
  • 25
1

Why not just apply it to the container? Here is the Jsfiddle

#container {
    border-radius: 4px;
    box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.1);
    border: solid 1px #e1e1e1;
}
Aaqib
  • 9,942
  • 4
  • 21
  • 30
Billy Fischbach
  • 191
  • 1
  • 9