# LED Grid documentation

- Example
- Properties

## Example

    <script>
        window.onload = function ()
        {
            // Create the LED object
            var led = new OfficeExcel.LED('myCanvas', 'An LED display');

            // Configure the LED chart to look as wished
            led.Set('chart.dark', '#666');
            led.Set('chart.light', 'white');

            // Call the .Draw() method to draw the chart
            led.Draw();
        }
    </script>

The example file is here.

## Properties

You can use these properties to control how the LED grid apears.

- Chart configuration
- Interactive features
- Zoom

### Chart configuration

chart.dark
Color of the darkened (ie unlit) lights
Default: #eee
chart.light
Color of lit lights
Default: #f66
chart.background
The color of the background.
Default: white

### Interactive features

chart.resizable
Defaulting to false, this determines whether your chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).
Default: false
chart.resize.handle.background
With this you can specify the background color for the resize handle. If you're adjusting the position of the handle then you may need this to make the handle stand out more.
Default: null

### Zoom

chart.zoom.mode
Can be used to control whether the zoom is in thumbnail or canvas mode. Possible values are: thumbnail and canvas.
Default: canvas
chart.zoom.factor
This is the factor that the chart will be zoomed by (bigger values means more zoom)
Default: 1.5
chart.zoom.fade.in
Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode.
Default: true
chart.zoom.fade.out
Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode.
Default: true
chart.zoom.hdir
The horizontal direction of the zoom. Possible values are: left, center, right
Default: right
chart.zoom.vdir
The vertical direction of the zoom. Possible values are: up, center, down
Default: down
chart.zoom.delay
The delay (in milliseconds) between frames.
Default: 50
chart.zoom.frames
The number of frames in the zoom animation.
Default: 10
chart.zoom.shadow
Whether or not the zoomed canvas has a shadow or not.
Default: true
chart.zoom.thumbnail.width
When the zoom is in thumbnail mode, this is the width (in pixels) of the thumbnail.
Default: 75
chart.zoom.thumbnail.height
When the zoom is in thumbnail mode, this is the height (in pixels) of the thumbnail.
Default: 75
chart.zoom.thumbnail.fixed
When the zoom is in thumbnail mode, you can use this property to fix the zoom in the top left corner instead of it following the cursor around.
Default: false
chart.zoom.background
Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page.
Default: true