Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 70 additions & 10 deletions ar/features/report.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ openyida create-report APP_XXXXXX "Sales Dashboard" '{
{
"type": "bar",
"title": "Monthly Sales",
"dataSource": "sales_form",
"cubeCode": "FORM_XXXXXX",
"xField": "month",
"yField": "amount"
}
Expand Down Expand Up @@ -73,14 +73,59 @@ openyida append-chart <appType> <reportId> '<JSON تعريف الرسم البي
openyida append-chart APP_XXXXXX REPORT_XXXXX '{
"type": "line",
"title": "Growth Trend",
"dataSource": "form_sales",
"cubeCode": "FORM_XXXXXX",
"xField": "month",
"yField": "growth_rate"
}'
```

---

## تكوين المرشحات

تدعم التقارير إضافة مرشحات مرتبطة بالرسوم البيانية، مما يتيح للمستخدمين تصفية البيانات المعروضة ديناميكيًا.

```json
{
"filters": [
{
"field": "region",
"label": "المنطقة",
"type": "dropdown",
"defaultValue": "all"
},
{
"field": "date_range",
"label": "الفترة الزمنية",
"type": "dateRange",
"defaultValue": "last_30_days"
}
],
"charts": [
{
"type": "bar",
"title": "Sales by Region",
"cubeCode": "FORM_XXXXXX",
"xField": "region",
"yField": "amount"
}
]
}
```

| الحقل | الوصف |
|-------|-------|
| **field** | اسم الحقل في مصدر البيانات المراد التصفية بناءً عليه |
| **label** | التسمية المعروضة للمرشح في واجهة المستخدم |
| **type** | نوع المرشح: `dropdown`، `dateRange`، `text`، `number` |
| **defaultValue** | القيمة الافتراضية عند تحميل التقرير |

<Info>
عند تعيين نوع المرشح إلى `dropdown`، يتم إنشاء قائمة منسدلة تلقائيًا بناءً على القيم الفريدة الموجودة في الحقل المحدد.
</Info>

---

## أنواع الرسوم البيانية

| النوع | الوصف | الاستخدام الأمثل |
Expand All @@ -95,6 +140,7 @@ openyida append-chart APP_XXXXXX REPORT_XXXXX '{
| **combo** | رسم بياني مركب (أعمدة + خطوط) | مقارنات المحور المزدوج |
| **pivot** | جدول محوري متقاطع | تحليل متعدد الأبعاد |
| **gauge** | مقياس | تتبع التقدم أو الأهداف |
| **radar** | مخطط رادار | مقارنات متعددة الأبعاد |
| **funnel** | رسم بياني قمعي | التحويل عبر المراحل |

---
Expand Down Expand Up @@ -130,7 +176,7 @@ openyida append-chart APP_XXXXXX REPORT_XXXXX '{
{
"type": "bar",
"title": "Sales by Region",
"dataSource": "form_uuid",
"cubeCode": "FORM_XXXXXX",
"xField": "region",
"yField": "amount",
"aggregation": "sum",
Expand All @@ -145,7 +191,7 @@ openyida append-chart APP_XXXXXX REPORT_XXXXX '{
{
"type": "line",
"title": "Traffic Trend",
"dataSource": "form_uuid",
"cubeCode": "FORM_XXXXXX",
"xField": "date",
"yField": "visitors",
"aggregation": "sum"
Expand All @@ -158,7 +204,7 @@ openyida append-chart APP_XXXXXX REPORT_XXXXX '{
{
"type": "pie",
"title": "Market Share",
"dataSource": "form_uuid",
"cubeCode": "FORM_XXXXXX",
"categoryField": "product",
"valueField": "share"
}
Expand All @@ -170,7 +216,7 @@ openyida append-chart APP_XXXXXX REPORT_XXXXX '{
{
"type": "table",
"title": "Detail View",
"dataSource": "form_uuid",
"cubeCode": "FORM_XXXXXX",
"columns": [
{ "field": "name", "title": "Name" },
{ "field": "amount", "title": "Amount" },
Expand All @@ -181,6 +227,20 @@ openyida append-chart APP_XXXXXX REPORT_XXXXX '{

---

## تنسيق cubeCode

يُستخدم حقل `cubeCode` لتحديد مصدر البيانات (النموذج) المرتبط بالرسم البياني. يتبع التنسيق التالي:

- **`FORM_XXXXXX`** — معرّف النموذج الفريد في نظام Yida. يمكنك الحصول عليه من إعدادات النموذج أو من عنوان URL الخاص بالنموذج.
- يجب أن يبدأ دائمًا بالبادئة `FORM_` متبوعة بمعرّف النموذج.
- مثال: `"cubeCode": "FORM_MONTHLY_SALES"` يشير إلى نموذج المبيعات الشهرية.

<Warning>
تأكد من استخدام `cubeCode` الصحيح للنموذج المطلوب. استخدام معرّف غير صحيح سيؤدي إلى عدم عرض البيانات في الرسم البياني.
</Warning>

---

## دوال التجميع

| الدالة | الوصف |
Expand All @@ -203,30 +263,30 @@ openyida append-chart APP_XXXXXX REPORT_XXXXX '{
{
"type": "bar",
"title": "Monthly Sales",
"dataSource": "form_monthly_sales",
"cubeCode": "FORM_MONTHLY_SALES",
"xField": "month",
"yField": "sales_amount",
"aggregation": "sum"
},
{
"type": "pie",
"title": "Product Categories",
"dataSource": "form_sales",
"cubeCode": "FORM_SALES",
"categoryField": "product_category",
"valueField": "sales_amount"
},
{
"type": "line",
"title": "Sales Trend",
"dataSource": "form_daily_sales",
"cubeCode": "FORM_DAILY_SALES",
"xField": "date",
"yField": "sales_amount",
"aggregation": "sum"
},
{
"type": "table",
"title": "Sales Detail",
"dataSource": "form_sales",
"cubeCode": "FORM_SALES",
"columns": [
{ "field": "order_no", "title": "Order No.", "width": 150 },
{ "field": "customer_name", "title": "Customer", "width": 200 },
Expand Down
73 changes: 63 additions & 10 deletions de/features/report.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ openyida create-report APP_XXXXXX "Sales Dashboard" '{
{
"type": "bar",
"title": "Monthly Sales",
"dataSource": "sales_form",
"cubeCode": "FORM_XXXXXX",
"xField": "month",
"yField": "amount"
}
Expand Down Expand Up @@ -73,14 +73,54 @@ openyida append-chart <appType> <reportId> '<Diagrammdefinition-JSON-oder-Datei>
openyida append-chart APP_XXXXXX REPORT_XXXXX '{
"type": "line",
"title": "Growth Trend",
"dataSource": "form_sales",
"cubeCode": "FORM_XXXXXX",
"xField": "month",
"yField": "growth_rate"
}'
```

---

## Filterkonfiguration

Berichte unterstützen Filter, die mit Diagrammen verknüpft werden können. Über die `filters`-Eigenschaft in der Berichtskonfiguration definieren Sie Filtersteuerungen, die auf ein oder mehrere Diagramme angewendet werden.

```json
{
"charts": [...],
"filters": [
{
"label": "Region",
"field": "region",
"type": "dropdown",
"cubeCode": "FORM_SALES",
"chartIds": ["chart_1", "chart_2"]
},
{
"label": "Zeitraum",
"field": "date",
"type": "dateRange",
"cubeCode": "FORM_DAILY_SALES",
"chartIds": ["chart_3"]
}
]
}
```

| Feld | Beschreibung |
|------|-------------|
| **label** | Anzeigetext des Filters |
| **field** | Feldname in der Datenquelle |
| **type** | Filtertyp (`dropdown`, `dateRange`, `text`, `number`) |
| **cubeCode** | CubeCode des verknüpften Formulars |
| **chartIds** | Liste der Diagramm-IDs, auf die der Filter angewendet wird |

<Info>
Wenn der Filtertyp `dropdown` ist und keine Optionen angegeben werden, werden die Dropdown-Werte automatisch aus den Daten der verknüpften Datenquelle generiert.
</Info>

---

## Diagrammtypen

| Typ | Beschreibung | Geeignet für |
Expand All @@ -95,6 +135,7 @@ openyida append-chart APP_XXXXXX REPORT_XXXXX '{
| **combo** | Kombi-Diagramm (Balken + Linie) | Vergleiche mit Doppelachse |
| **pivot** | Kreuz-Pivottabelle | Mehrdimensionale Analyse |
| **gauge** | Messgerät-Diagramm | Fortschritts- oder Zielverfolgung |
| **radar** | Radar-Diagramm | Mehrdimensionale Vergleiche |
| **funnel** | Trichterdiagramm | Stufenweise Konversion |

---
Expand Down Expand Up @@ -130,7 +171,7 @@ Das Setzen von `w` oder `h` auf `0` ist gültig und wird berücksichtigt. Bei Au
{
"type": "bar",
"title": "Sales by Region",
"dataSource": "form_uuid",
"cubeCode": "FORM_XXXXXX",
"xField": "region",
"yField": "amount",
"aggregation": "sum",
Expand All @@ -145,7 +186,7 @@ Das Setzen von `w` oder `h` auf `0` ist gültig und wird berücksichtigt. Bei Au
{
"type": "line",
"title": "Traffic Trend",
"dataSource": "form_uuid",
"cubeCode": "FORM_XXXXXX",
"xField": "date",
"yField": "visitors",
"aggregation": "sum"
Expand All @@ -158,7 +199,7 @@ Das Setzen von `w` oder `h` auf `0` ist gültig und wird berücksichtigt. Bei Au
{
"type": "pie",
"title": "Market Share",
"dataSource": "form_uuid",
"cubeCode": "FORM_XXXXXX",
"categoryField": "product",
"valueField": "share"
}
Expand All @@ -170,7 +211,7 @@ Das Setzen von `w` oder `h` auf `0` ist gültig und wird berücksichtigt. Bei Au
{
"type": "table",
"title": "Detail View",
"dataSource": "form_uuid",
"cubeCode": "FORM_XXXXXX",
"columns": [
{ "field": "name", "title": "Name" },
{ "field": "amount", "title": "Amount" },
Expand All @@ -181,6 +222,18 @@ Das Setzen von `w` oder `h` auf `0` ist gültig und wird berücksichtigt. Bei Au

---

## CubeCode-Format

Der `cubeCode` identifiziert die Formular-Datenquelle für ein Diagramm. Er folgt dem Format `FORM_` gefolgt von einem eindeutigen Bezeichner.

- **Standardformat**: `FORM_XXXXXX` — wobei `XXXXXX` die eindeutige Formular-ID ist (z. B. `FORM_A1B2C3`).
- **Benannte Formulare**: Wenn das Formular einen aussagekräftigen Namen hat, kann der cubeCode diesen widerspiegeln, z. B. `FORM_MONTHLY_SALES` oder `FORM_DAILY_SALES`.
- Der cubeCode muss immer mit dem Präfix `FORM_` beginnen und in Großbuchstaben geschrieben sein.

Sie finden den cubeCode eines Formulars in den Formulareinstellungen oder über die Yida-Verwaltungsoberfläche.

---

## Aggregationsfunktionen

| Funktion | Beschreibung |
Expand All @@ -203,30 +256,30 @@ Das Setzen von `w` oder `h` auf `0` ist gültig und wird berücksichtigt. Bei Au
{
"type": "bar",
"title": "Monthly Sales",
"dataSource": "form_monthly_sales",
"cubeCode": "FORM_MONTHLY_SALES",
"xField": "month",
"yField": "sales_amount",
"aggregation": "sum"
},
{
"type": "pie",
"title": "Product Categories",
"dataSource": "form_sales",
"cubeCode": "FORM_SALES",
"categoryField": "product_category",
"valueField": "sales_amount"
},
{
"type": "line",
"title": "Sales Trend",
"dataSource": "form_daily_sales",
"cubeCode": "FORM_DAILY_SALES",
"xField": "date",
"yField": "sales_amount",
"aggregation": "sum"
},
{
"type": "table",
"title": "Sales Detail",
"dataSource": "form_sales",
"cubeCode": "FORM_SALES",
"columns": [
{ "field": "order_no", "title": "Order No.", "width": 150 },
{ "field": "customer_name", "title": "Customer", "width": 200 },
Expand Down
Loading