> For the complete documentation index, see [llms.txt](https://docs.lineverge.com/automail/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lineverge.com/automail/configurations/ui-configuration/site/panels/chartjs.md).

# ChartJS

{% hint style="info" %}
For this content, the panel frame url\_name must be **frame\_chartjs**, and it must have a type (e.g. **combo\_double\_y\_axis**).

```python
{
    'title': 'Performance',
    'width': 12,
    'height': 450,
    'full_row': True,
    'type': 'combo_double_y_axis',
    'url_name': 'frame_chartjs',
    'url_action_name': 'panel_delivery_report_monthly_otp_autoform',
    ...
```

{% endhint %}

The content has the following attributes and possible panel type values (defined at the panel level, not the content level):

* **view** with possible values:
  * **api\_views.ChartJSAPIPie** for pie charts, with required panel type **pie**
  * **api\_views.ChartJSAPILine** for line charts
  * **api\_views.ChartJSAPIBar** for bar charts, with possible panel types **bar** (vertical bars) or **horizontalBar** (horizontal bars). The panel attribute **stacked\_chart** can be set to False to avoid stacking the bars if the grouping has more than one field.
  * **api\_views.ChartJSAPIBarDaily** for bar charts with datetime values converted into date values
  * **api\_views.ChartJSAPIRadar** for radar charts with required panel type **radar**&#x20;

```python
{
    "title": "Monthly OTP",
    "width": 12,
    "height": 565,
    "row_start": True,
    "type": "combo_double_y_axis",
    "url_name": "frame_chartjs",
    "url_action_name": "panel_scorecard_monthly_otp",
    "content": {
        'view': custom_views.ChartJSAPIComboOTP,
        'url_params_list': [
            None,
            {'group_by': 'vendor__name'},
            {'group_by': 'ready_d_month__year_month_name_short'},
        ],
        'view_params': {
            'label_quantity': 'Shipped Quantity (units)',
            'month_field': 'ready_d_month',
            'model': custom_models.Delivery,
            'decimal_rounding': 4,
            'limit': 15,
            'order_by': '-annotation',
            'aggregations': [
                {'function': 'Sum', 'value': 'ready_quantity'},
                {'function': 'Custom', 'value': Cast(Sum('ontime_quantity'), FloatField())/Cast(Sum('ready_quantity'), FloatField())},
            ],
            'include_filters_extra': {
                'monitor__isnull': False,
                'ready_quantity__gt': 0,
            }
        },
    }
}
```

<figure><img src="/files/STNWdQGE78tKP4Kv2lkR" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.lineverge.com/automail/configurations/ui-configuration/site/panels/chartjs.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
