Shimoku docs
Search…
Ring Gauge
Multiple values compared to each other can be represented in a circular or Ring gauge. To represent multiple values, the type of data must be an array of objects that consist of a value and a name.

The method to use

The method is shimoku.plt.ring_gauge()
It must contain the following input variables:
data: Union[str, DataFrame, List[Dict]]
name: str
value: str
menu_path: str
order: int
And accepts the following input variable as optional:
title: Optional[str]
option_modifications: Optional[Dict]
rows_size: Optional[int]
cols_size: Optional[int]
padding: Optional[List[int]]

Examples

1. Default configuration

data_ = [
{
"value": 100,
"name": "First"
},
{
"value": 80,
"name": "Second"
},
{
"value": 60,
"name": "Third"
},
{
"value": 40,
"name": "Fourth"
},
{
"value": 20,
"name": "Fifth"
}
]
shimoku.plt.ring_gauge(
data=data_, name='name', value='value',
menu_path='test/ring-gauge-1',
order=0,
rows_size=2, cols_size=12,
)
The result is:
The ring gauge with default configuration.

2. Title for the chart, changing data and padding

It is possible to personalize the title of the chart, and change data at will. Padding control the position of the gauge in the page.
data_ = [
{
"value": 20,
"name": "Marble"
},
{
"value": 50,
"name": "Granite"
},
{
"value": 70,
"name": "Basalt"
},
{
"value": 90,
"name": "Rhyolite"
},
]
shimoku.plt.ring_gauge(
data=data_, name='name', value='value',
menu_path='test/ring-gauge-2',
order=0,
rows_size=2, cols_size=8,
padding='0,0,0,2',
title='Reverberation time in milliseconds',
)
The result is:
The ring gauge is fully customized, note the space before the component with padding='0,0,0,2', and cols_size=8 changing the size of the component.
Changing menu_path The menu_path can be modified.
It is possible to use any number of rows.
Copy link
On this page
The method to use
Examples