v.0.18
2023.04.25
Last updated
2023.04.25
Last updated
The package shimoku-api-python is no longer maintained
To get the new version 🦾
This version expands massively the charts catalog as well as bringing a new navigation tool!
Horizontal indicators group now occupies all available columns given. Previously, if the number of indicators didn't divide the number of columns, sometimes the sum of the sizes of the indicators didn't equal the number of given columns. The remaining space is now filled with padding
.
A new component has been added to the shimoku_components_catalog library! It is an iteration on the previous title component, it brings a lot more features and customization options:
This next example shows a basic configuration of the component that uses the primary colors palette:
The modal used in this component is not the same as the report Modal!
The new navigation tool added is the Modal report! A Modal report is a type of container report that allows you to include other reports inside of it, much like a Tabs report. When a Modal report is opened, it appears as a pop-up window that overlays the current page. This report type is useful for navigating between different reports or for drilling down into specific insights.
Modal reports are often used in situations where users need to perform complex actions or view large amounts of data. For example, a Modal report might be used to display a detailed breakdown of a particular product, with the ability to drill down into individual components such as sales by region or by customer.
All the charts have been added the parameter modal_name: Optional[str]
, when provided it will include the report inside the modal.
For the specific case of the Tabs report a function has been created so that a tabs group can be included inside a Modal:
For the customization and variation of the modal's behavior the function s.plt.update_modal
must be used. The size of the modal can be changed, and the option to open the modal by default (when the user enters the path) can be achieved by setting the open_by_default: bool
to True
.
Another way to open the modal is by a button that triggers the event, the function to use is s.plt.modal_button
. It has mostly the same parameters of the button function but is dedicated to opening a modal:
The next example shows how to include a normal report to a modal as well as a tabs group, and how to create a button to open that modal:
Now the input forms groups can trigger events when sent! The two new arguments are:
Using this arguments a modal can be opened or an activity can be called when the submit button is clicked.
In the following example it is shown how to link a modal and an activity to a form:
The form in the dashboard appears:
After clicking the 'send' button the modal is opened and an activity is called, in this case the activity provided doesn't have a webhook attached so it gives an error:
Four new composite charts have been added. Each one of them uses a bentobox to group a user defined chart with a predefined component or group of components.
We have named the first type of charts as the Infographics Charts. These consist on joining a text bubble with a user selected chart, there are 4 options for the position of the text bubble (top, down, left, right), and it can be customized with background colors and images. It also provides the option to set an image on top of the bubble for the horizontal configuration.
The function works like so:
Here are some examples on how it could be used:
To start, the variable values that will be used are:
Top and bottom:
Default chart and background image:
Horizontal configuration with top image:
The next entry is a drill-down chart that joins a user defined chart with a message and a modal button. The function parameters are:
An example on how to use it is:
A common use case of the bentobox is to fuse indicators with other indicators and charts, as they are small reports that can easily add insight, so we have facilitated this with the chart with indicators. The function parameters are:
Because it is using multiple indicators the function will return the next available order.
The next example uses four groups of indicators and a line chart:
This last composite chart uses the previous one to create a group of indicators with a header. In this case the function definition is just a call of the previous one:
Because it is using multiple indicators the function will return the next available order.
The next example shows how to use the function:
Six new charts that use the s.plt.free_echarts
method have bee added. Each one of them solves a concrete problem or group of problems important enough so that they have been included as library charts.
Scatter with effect: A scatter plot with a visual effect that highlights important points. This chart is useful for identifying patterns or trends in data and for emphasizing specific data points.
To specify which points will have the effect the parameter effect_points
must be used, it interprets each element of a list, if the elment is a list of two elements it will take that as coordinates and if the element is an integer it will take the coordinates of the point stored in the 'element' index from the source points (f.e. if element==1 the coordinates of the first point will be used).
The input parameters are the following:
An example of use is:
Line and bar charts: A combination of line and bar charts where the lines have one y-axis and the bar charts have another. This chart is useful for comparing two different sets of data that have different scales, such as sales revenue and customer satisfaction scores.
Each axis has it's scale and it's axis name, both groups share the same space. The parameters of the function are:
An example on how to use the function is:
Line with confidence area: A line chart with a shaded area that represents a confidence interval around the line. This chart is useful for showing the range of possible values around a trend line and for indicating the level of confidence in the data.
The dataframe will have to have three value fields (top line, value line and bottom_line). The parameters of the function are:
An example is: