diff --git a/src/modules/blocks/code/code-renderers/useDynamicChartJS.ts b/src/modules/blocks/code/code-renderers/useDynamicChartJS.ts index fde2107c9..ed57cbcc2 100644 --- a/src/modules/blocks/code/code-renderers/useDynamicChartJS.ts +++ b/src/modules/blocks/code/code-renderers/useDynamicChartJS.ts @@ -11,6 +11,8 @@ import type { Chart as ChartConstructorType } from 'chart.js/auto'; import { devDependencies } from '../../../../../package.json'; +import { themeFontFamilyCss } from '~/common/app.theme'; + // Configuration const CHARTJS_VERSION = '4.4.4'; @@ -61,7 +63,10 @@ function loadCDNScript(): Promise { } function initializeChartJS(Chart: typeof ChartConstructorType): typeof ChartConstructorType { - // Add custom plugins, options, etc. here + Chart.defaults.font.family = themeFontFamilyCss; + Chart.defaults.font.size = 13; + Chart.defaults.maintainAspectRatio = true; + Chart.defaults.responsive = true; return Chart; }