Shimoku Gauge

Half ring 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:

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'
)

Shimoku Gauges Group

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.

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.

# 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,
)

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.

  • 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.

Last updated