# Shimoku Gauge

Gauge charts with the Shimoku flavor, they are called the Shimoku gauges. They are minimalist and useful for a quick view on various metrics. The function is called `s.plt.shimoku_gauge`.

The method accepts various types of colors as the parameter color. There are a group of default colors that can be used passing an integer from 1 to 10, also it can accept some keywords that will activate dashboard specific colors, the list is:

```
'success', 'error', 'warning', 'success-light', 'error-light', 'warning-light', 'status-error'
```

By default they show the percentage symbol but it can be deactivated by setting the parameter `is_percentage` to `False`.

An example on how to use them is:

```python
s.plt.shimoku_gauge(
    value=-48, menu_path=menu_path, order=0,
    rows_size=1, cols_size=3, name="Shimoku",
    color=1
)
    
s.plt.shimoku_gauge(
    value=3.56, menu_path=menu_path, order=1,
    rows_size=1, cols_size=3,
    color="status-error"
)
    
s.plt.shimoku_gauge(
    value=-90, menu_path=menu_path, order=2,
    rows_size=1, cols_size=3, name="gauges",
    color='#00F0FF'
)
```

<figure><img src="/files/2z6gWo2KWKzcqWmmtJo4" alt=""><figcaption><p>Shimoku gauges</p></figcaption></figure>

## Shimoku Gauges Group&#x20;

It makes use of the Shimoku gauge and the Bento box feature. It takes as data a list of dictionaries (or dataFrame) where the necessary information for each gauge must be provided.&#x20;

This component can calculate the percentages of the group of gauges provided, like the stacked bar chart component, this can be activated by setting the parameter `calculate_percentages` to `True.`

```python
# Same data as for the stacked barcharts
df = pd.read_csv('../data/test_stack_distribution.csv')

value_columns = [col for col in df.columns if col != "Segment"]
df = df[['Segment'] + value_columns]

gauges_data = pd.DataFrame(columns=["name", "value", "color"])
df_transposed = df.transpose().reset_index().drop(0)
value_columns = [col for col in df_transposed.columns if col != "index"]
gauges_data["value"] = df_transposed[value_columns].apply(lambda row: sum(row), axis=1)
gauges_data["name"] = df_transposed['index']
gauges_data["color"] = range(1, len(df_transposed) + 1)

s.plt.shimoku_gauges_group(
    gauges_data=gauges_data, order=0,
    cols_size=12, rows_size=3,
    calculate_percentages=True,
)
```

<figure><img src="/files/oydfte4X3Xy8XcU3v9xI" alt=""><figcaption><p>Shimoku gauges group with percentages calculated</p></figcaption></figure>

## Interesting Usages

* Showing progress towards a goal: Gauge charts are ideal for showing progress towards a goal. For example, you could use a gauge chart to show how much of a fundraising goal has been reached.

  <figure><img src="/files/FAjQK0KsVyu5Pq3cVMxm" alt=""><figcaption><p>Project progress</p></figcaption></figure>

* Displaying key performance indicators (KPIs): Gauge charts can also be used to display key performance indicators, such as the completion rate of a project or the percentage of customer complaints resolved within a certain time-frame.

  <figure><img src="/files/rvOg1uRPqfDWpEkgxnwO" alt=""><figcaption><p>KPIs tracking</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.shimoku.com/dev/elements/charts/gauge-charts/shimoku-gauge.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
