# v.0.3

{% hint style="danger" %}
This version has been deprecated. If used with the current API version it can produce unexpected behaviour or errors.
{% endhint %}

{% hint style="danger" %}
The package shimoku-api-python is no longer maintained
{% endhint %}

{% hint style="info" %}
To get the new version :rocket:
{% endhint %}

```
pip install --upgrade shimoku-api-python
```

### Fixes <a href="#fixes" id="fixes"></a>

* Alert Indicators `s.plt.alert_indicator()` can have other Reports in the same row.
* The variable `menu_path` now doesn’t modify capital and lower cases

<br>

![](https://3782181538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUlHTfmIZY46Z1EDfyGMz%2Fuploads%2FJsynbPsMIJGiUqTdqkiF%2Fimage.png?alt=media\&token=8d99ddc4-081e-4f37-98cc-319a3e4829ed)

### New <a href="#new" id="new"></a>

* `s.plt.delete_path()` Which can be used to remove any URL with all the reports within it directly. Example:

![](https://3782181538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUlHTfmIZY46Z1EDfyGMz%2Fuploads%2F3RhPU0phYKUqHa0G1ERW%2Fimage.png?alt=media\&token=d00d3e99-5b75-44bb-ae1a-fa340ca87270)

Let’s say that we have a menu path equals to `test-path/line-test'` and we want to remove `line-test` and everything on it, then we can:

```
s.plt.delete_path('test-path/line-test')
```

![](https://3782181538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUlHTfmIZY46Z1EDfyGMz%2Fuploads%2F6ngNxz4VG1Vl4cYlPr5l%2Fimage.png?alt=media\&token=b0fbded8-056e-4744-b3cb-bd6f10bf0fdb)

Or you may want to remove it all, then you can simply delete it in the following way:

```
s.plt.delete_path('test-path')
```

![](https://3782181538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUlHTfmIZY46Z1EDfyGMz%2Fuploads%2Fq0c6GmzyVr9kLQ9UJkCx%2Fimage.png?alt=media\&token=f461a803-814c-4db5-9efb-44ec77036eff)

* `s.plt.append_data_to_trend_chart()` Now it is possible to append data to already existing charts. For example

```python
app_path: str = 'test'
menu_path: str = f'{app_path}/append-test'

data = [
    {'date': dt.date(2021, 1, 1), 'x': 5, 'y': 5},
    {'date': dt.date(2021, 1, 2), 'x': 6, 'y': 5},
    {'date': dt.date(2021, 1, 3), 'x': 4, 'y': 5},
    {'date': dt.date(2021, 1, 4), 'x': 7, 'y': 5},
    {'date': dt.date(2021, 1, 5), 'x': 3, 'y': 5},
]

s.plt.line(
    data=data,
    x='date', y=['x', 'y'],
    menu_path=menu_path,
    row=1, column=1,
)

data_ = [
    {'date': dt.date(2021, 1, 6), 'x': 5, 'y': 5},
    {'date': dt.date(2021, 1, 7), 'x': 6, 'y': 5},
]

s.plt.append_data_to_trend_chart(
    menu_path=menu_path,
    row=1, column=1,
    component_type='line',
    data=data_,
    x='date', y=['x', 'y'],
)
```

It will first create the chart and second append the new 2 days of data:

![](https://3782181538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUlHTfmIZY46Z1EDfyGMz%2Fuploads%2F7PY14hUGv72wzwtW3HS9%2Fimage.png?alt=media\&token=1aab83a3-7370-4160-b226-1a33ceda1a1d)

* A new chart: **Horizontal barchart** is available: `s.plt.horizontal_barchart()` An example follows

```python
data_ = [
    {'Name': 'a', 'y': 5, 'z': 3},
    {'Name': 'b', 'y': 7, 'z': 4},
    {'Name': 'c', 'y': 3, 'z': 5},
    {'Name': 'd', 'y': 5, 'z': 6},
]

s.plt.horizontal_barchart(
    data=data_,
    x=['y', 'z'], y='Name',
    menu_path=menu_path,
    row=1, column=1,
)
```

![](https://3782181538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUlHTfmIZY46Z1EDfyGMz%2Fuploads%2FUmQa2thSLa3wpN57uY1f%2Fimage.png?alt=media\&token=59f6cda6-7ec0-4919-b9bd-5a09abc48a9b)

* A new chart: **Zero centered barchart** is available: `s.plt.zero_centered_barchart()` An example follows:

```python
data_ = [
    {'Name': 'a', 'y': 5},
    {'Name': 'b', 'y': -7},
    {'Name': 'c', 'y': 3},
    {'Name': 'd', 'y': -5},
]

s.plt.zero_centered_barchart(
    data=data_,
    x='Name', y=['y'],
    menu_path=menu_path,
    row=1, column=1,
)
```

![](https://3782181538-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUlHTfmIZY46Z1EDfyGMz%2Fuploads%2F77ExXCYhyfkzbn4fkm4F%2Fimage.png?alt=media\&token=5efc8f49-2120-44ac-a53b-9b098dc0b3f9)
