Core Docs

Chart

Render biểu đồ (column / line / pie / area …) từ dataset OData.

Source: Core/Components/Chart.cs · ComType: Chart

Cấu hình

ComType:     Chart
Query:       ?$filter=Year eq 2026
GroupBy:     Month
ClassName:   chart-bar
FormatData:  "{Month}: {Value}"

Field DB dùng

FieldVai trò
QueryOData querystring đủ ?$filter=... load dataset cho chart.
GroupByField aggregate theo (vd Month, Status, CountryName).
ClassNameLoại chart: chart-bar, chart-line, chart-pie, chart-area, …
FormatDataFormat hiển thị tooltip / label ("{Month}: {Value}").
FormatEntityFormat toàn bộ entity row làm tooltip data.
EventsJSON map {"click": "OnChartClicked"} để hook click data point.
PlainTextTrue → render text mode (rare).

Events kích hoạt

EventMethod signature
click(data, this)

data là object data point được click — chart-aware (chứa label, value, index).

public void OnChartClicked(object data, object chart)
{
    Toast.Small("Click: " + data);
    // drill-down vào báo cáo chi tiết
}

Tip

  • Query là OData querystring đủ ?$filter=....
  • GroupBy = field aggregate theo (vd Month, Status, CountryName).
  • ClassName chọn loại chart: chart-bar, chart-line, chart-pie, …
  • Variant đơn giản hơn: ChartV2.

Core Docs · Astro · Core.API/wwwRoot/docs