Dashboard Chart inside Dashboard

hi guys, I just want to ask about something, is it possible inside my dashboard when creating a dashboard chart, can I customize the font size of words in x-axis? is there an option for this? I want the words on the x-axis to appear bigger how can I do this?

@SandySamyFarah Hi,

As per our analysis, the requirement to increase the font size of X-axis labels in Frappe/ERPNext Dashboard Charts is not supported directly through the standard UI configuration.

Frappe’s dashboard charts are rendered using internal chart libraries, and currently, there is no built-in option in the Dashboard Chart DocType to customise axis label font sizes.

At present, achieving this customisation requires a workaround (JS/CSS or code-level override), as it is not configurable via standard settings in Frappe.

Possible Workaround (Custom Script)

We can attempt a client-side customization by overriding the chart after it renders using JavaScript. A sample approach is as follows:

frappe.pages[‘your-dashboard-page’].on_page_load = function(wrapper) {

setTimeout(() => {

    const chart = frappe.container.page.dashboard.chart_area.chart;



    if (chart && chart.chart) {

        chart.chart.options.axisOptions.xAxisLabelFontSize = 16;

        chart.chart.draw();

    }

}, 1000);

};

Important Notes:

  • This approach is not officially supported and depends on how the dashboard is structured internally.

  • The chart object path may vary, so inspection (console debugging) might be required.

  • In some cases, this may not work consistently across versions due to dynamic rendering.

Thanks!

1 Like