# FillerGauge Examples

**Component Reference:** FillerGauge or @splunk/visualizations/FillerGauge

## Basic Filler Gauge

- **Key:** Basic

```jsx
import React from 'react';
import FillerGauge from '@splunk/visualizations/FillerGauge';

export default () => (
    <FillerGauge
        options={{}}
        dataSources={{
            primary: {
                requestParams: { offset: 0, count: 20 },
                data: {
                    fields: [{ name: 'count' }],
                    columns: [['78']],
                },
                meta: { totalCount: 20 },
            },
        }}
    />
);
```

## Background Color - Blue

- **Key:** Backgroundcolor

```jsx
import React from 'react';
import FillerGauge from '@splunk/visualizations/FillerGauge';

export default () => (
    <FillerGauge
        options={{ backgroundColor: '#0000FF' }}
        dataSources={{
            primary: {
                requestParams: { offset: 0, count: 20 },
                data: {
                    fields: [{ name: 'count' }],
                    columns: [['78']],
                },
                meta: { totalCount: 20 },
            },
        }}
    />
);
```

## Gauge Color - Green

- **Key:** Gaugecolor

```jsx
import React from 'react';
import FillerGauge from '@splunk/visualizations/FillerGauge';

export default () => (
    <FillerGauge
        options={{ gaugeColor: '#008000' }}
        dataSources={{
            primary: {
                requestParams: { offset: 0, count: 20 },
                data: {
                    fields: [{ name: 'count' }],
                    columns: [['78']],
                },
                meta: { totalCount: 20 },
            },
        }}
    />
);
```

## Label Display - Off

- **Key:** Nolabels

```jsx
import React from 'react';
import FillerGauge from '@splunk/visualizations/FillerGauge';

export default () => (
    <FillerGauge
        options={{ labelDisplay: 'off' }}
        dataSources={{
            primary: {
                requestParams: { offset: 0, count: 20 },
                data: {
                    fields: [{ name: 'count' }],
                    columns: [['78']],
                },
                meta: { totalCount: 20 },
            },
        }}
    />
);
```

## Label Display - Percentage

- **Key:** Percentage Range

```jsx
import React from 'react';
import FillerGauge from '@splunk/visualizations/FillerGauge';

export default () => (
    <FillerGauge
        options={{ labelDisplay: 'percentage' }}
        dataSources={{
            primary: {
                requestParams: { offset: 0, count: 20 },
                data: {
                    fields: [{ name: 'count' }],
                    columns: [['78']],
                },
                meta: { totalCount: 20 },
            },
        }}
    />
);
```

## Major Tick Interval - 25

- **Key:** Majortickinterval

```jsx
import React from 'react';
import FillerGauge from '@splunk/visualizations/FillerGauge';

export default () => (
    <FillerGauge
        options={{ majorTickInterval: '25' }}
        dataSources={{
            primary: {
                requestParams: { offset: 0, count: 20 },
                data: {
                    fields: [{ name: 'count' }],
                    columns: [['78']],
                },
                meta: { totalCount: 20 },
            },
        }}
    />
);
```

## Orientation - Horizontal

- **Key:** Horizontal

```jsx
import React from 'react';
import FillerGauge from '@splunk/visualizations/FillerGauge';

export default () => (
    <FillerGauge
        options={{
            orientation: 'horizontal',
        }}
        dataSources={{
            primary: {
                requestParams: { offset: 0, count: 20 },
                data: {
                    fields: [{ name: 'count' }],
                    columns: [['78']],
                },
                meta: { totalCount: 20 },
            },
        }}
    />
);
```

## Value Display - Off

- **Key:** No Value

```jsx
import React from 'react';
import FillerGauge from '@splunk/visualizations/FillerGauge';

export default () => (
    <FillerGauge
        options={{ valueDisplay: 'off' }}
        dataSources={{
            primary: {
                requestParams: { offset: 0, count: 20 },
                data: {
                    fields: [{ name: 'count' }],
                    columns: [['78']],
                },
                meta: { totalCount: 20 },
            },
        }}
    />
);
```

## Value Display - Percentage

- **Key:** Percentage Value

```jsx
import React from 'react';
import FillerGauge from '@splunk/visualizations/FillerGauge';

export default () => (
    <FillerGauge
        options={{ valueDisplay: 'percentage' }}
        dataSources={{
            primary: {
                requestParams: { offset: 0, count: 20 },
                data: {
                    fields: [{ name: 'count' }],
                    columns: [['78']],
                },
                meta: { totalCount: 20 },
            },
        }}
    />
);
```

## Trellis

- **Key:** Trellis

```jsx
import React from 'react';
import { FeatureFlagContextProvider } from '@splunk/visualization-context/FeatureFlagContext';
import FillerGauge from '@splunk/visualizations/FillerGauge';

export default () => (
    <FeatureFlagContextProvider value={{ visualizations_enableTrellis: true }}>
        <FillerGauge
            options={{
                splitByLayout: 'trellis',
                trellisSplitBy: 'component',
                trellis: {
                    minColumnWidth: 200,
                },
            }}
            dataSources={{
                primary: {
                    data: {
                        fields: [
                            {
                                name: 'component',
                                groupby_rank: '0',
                            },
                            {
                                name: 'count',
                            },
                        ],
                        columns: [
                            ['Database', 'API', 'Cache', 'Queue', 'Frontend', 'Backend'],
                            ['78', '65', '82', '91', '73', '88'],
                        ],
                    },
                    meta: {},
                },
            }}
        />
    </FeatureFlagContextProvider>
);
```
