Summary
A dataset-bound report chart labels its measure axis with the measure's name (potential_upside_tons) instead of its authored label (可抢吨位(吨)). The table in the very same report resolves the same measure's label correctly, and a dashboard chart bound to the same dataset and measure also resolves it correctly — so this is the report chart renderer specifically, not a missing label and not a dataset problem.
The visible result on a Chinese console is a snake_case English identifier printed under an otherwise fully-translated chart.
Evidence
@objectstack/* 17.0.0-rc.1, fresh database, browser locale zh-CN.
Dataset (heimao_account_metrics) — the measure carries a label:
{ name: 'potential_upside_tons', label: '可抢吨位(吨)', aggregate: 'sum', field: 'competitor_supply_volume', format: '0,0' }
Report (heimao_key_account_attack_list):
chart: {
type: 'horizontal-bar',
title: '各客户可抢吨位',
showLegend: false,
xAxis: 'account_name',
yAxis: 'potential_upside_tons',
}
Rendered, on one screen:
| element |
renders |
| chart title |
各客户可抢吨位 ✅ (chart's own title) |
| chart measure-axis title |
potential_upside_tons ❌ |
| summary-table column header for the same measure |
可抢吨位(吨) ✅ |
Three reports, three measures, same failure — the axis always prints name, the table always prints label:
| report |
measure |
axis renders |
table renders |
heimao_key_account_attack_list |
potential_upside_tons |
potential_upside_tons |
可抢吨位(吨) |
heimao_customer_grade_distribution |
account_count |
account_count |
客户数 |
heimao_annual_supply_trend |
shipped_volume_tons |
shipped_volume_tons |
发货量(吨) |
The contrast that localizes the bug
A dashboard widget bound to the same dataset family resolves the label without any extra authoring:
{
id: 'hm_annual_supply_trend',
type: 'bar',
dataset: 'heimao_supply_history_metrics',
dimensions: ['year'],
values: ['shipped_volume_tons'], // no label authored here
}
renders its axis as 发货量(吨) — the dataset measure's label. Same measure name, same dataset layer, correct resolution. So the measure catalog is reachable at render time; the report chart path just does not consult it.
series[].label does not help
ReportChartSchema documents a series array with an optional label, which reads like the intended override. It has no effect:
chart: {
type: 'horizontal-bar',
xAxis: 'account_name',
yAxis: 'potential_upside_tons',
series: [{ name: 'potential_upside_tons', label: '可抢吨位(吨)' }], // ← added
}
Rebuilt, restarted, re-measured: the axis still renders potential_upside_tons. Verified for all three reports above. The change was reverted in our tree rather than left in, since it is inert metadata.
That leaves an app with no authorable way to control this string — neither the dataset measure label nor the chart's own series label reaches it.
Suggested fix
In the report chart renderer (DatasetReportRenderer / useDatasetRows path), resolve the axis/series display name the way the summary table already does:
chart.series[].label when the measure is named there, then
- the bound dataset's
measures[].label, then
- the measure
name as a last resort.
Honouring (1) alone would unblock apps immediately; (2) is what makes the default correct without per-chart authoring, and is what the dashboard renderer already does.
Related
Filed from a downstream app (hotcrm-heimao), tracked there as issue #60.
Summary
A dataset-bound report chart labels its measure axis with the measure's
name(potential_upside_tons) instead of its authoredlabel(可抢吨位(吨)). The table in the very same report resolves the same measure's label correctly, and a dashboard chart bound to the same dataset and measure also resolves it correctly — so this is the report chart renderer specifically, not a missing label and not a dataset problem.The visible result on a Chinese console is a snake_case English identifier printed under an otherwise fully-translated chart.
Evidence
@objectstack/*17.0.0-rc.1, fresh database, browser localezh-CN.Dataset (
heimao_account_metrics) — the measure carries a label:Report (
heimao_key_account_attack_list):Rendered, on one screen:
各客户可抢吨位✅ (chart's owntitle)potential_upside_tons❌可抢吨位(吨)✅Three reports, three measures, same failure — the axis always prints
name, the table always printslabel:heimao_key_account_attack_listpotential_upside_tonspotential_upside_tons可抢吨位(吨)heimao_customer_grade_distributionaccount_countaccount_count客户数heimao_annual_supply_trendshipped_volume_tonsshipped_volume_tons发货量(吨)The contrast that localizes the bug
A dashboard widget bound to the same dataset family resolves the label without any extra authoring:
renders its axis as
发货量(吨)— the dataset measure's label. Same measure name, same dataset layer, correct resolution. So the measure catalog is reachable at render time; the report chart path just does not consult it.series[].labeldoes not helpReportChartSchemadocuments aseriesarray with an optionallabel, which reads like the intended override. It has no effect:Rebuilt, restarted, re-measured: the axis still renders
potential_upside_tons. Verified for all three reports above. The change was reverted in our tree rather than left in, since it is inert metadata.That leaves an app with no authorable way to control this string — neither the dataset measure label nor the chart's own series label reaches it.
Suggested fix
In the report chart renderer (
DatasetReportRenderer/useDatasetRowspath), resolve the axis/series display name the way the summary table already does:chart.series[].labelwhen the measure is named there, thenmeasures[].label, thennameas a last resort.Honouring (1) alone would unblock apps immediately; (2) is what makes the default correct without per-chart authoring, and is what the dashboard renderer already does.
Related
resolveViewLabelreads two fields the served view document does not have #4854 — view / report / dataset labels have no live translation path. Adjacent but distinct: this one is not about i18n bundles at all, it is the authored label being dropped.Filed from a downstream app (
hotcrm-heimao), tracked there as issue #60.