diff --git a/__tests__/integration/snapshots/api/chart-options/step0.png b/__tests__/integration/snapshots/api/chart-options/step0.png index a187565c46..3c5800415d 100644 Binary files a/__tests__/integration/snapshots/api/chart-options/step0.png and b/__tests__/integration/snapshots/api/chart-options/step0.png differ diff --git a/__tests__/integration/snapshots/api/chart-options/step1.png b/__tests__/integration/snapshots/api/chart-options/step1.png index fee9f7e018..fe6c4301da 100644 Binary files a/__tests__/integration/snapshots/api/chart-options/step1.png and b/__tests__/integration/snapshots/api/chart-options/step1.png differ diff --git a/__tests__/plots/api/chart-options.ts b/__tests__/plots/api/chart-options.ts index 1758c493d0..60f09b13cf 100644 --- a/__tests__/plots/api/chart-options.ts +++ b/__tests__/plots/api/chart-options.ts @@ -12,6 +12,7 @@ export function chartOptions(context) { theme: 'classic', type: 'line', clip: true, + title: '标题', data: { type: 'fetch', value: 'data/aapl.csv', diff --git a/src/api/utils.ts b/src/api/utils.ts index 6f165627fb..bc9c010f23 100644 --- a/src/api/utils.ts +++ b/src/api/utils.ts @@ -27,6 +27,7 @@ export const VIEW_KEYS = [ 'marginBottom', 'autoFit', 'theme', + 'title', ]; export function normalizeContainer(