1

I am using vue-apexcharts in my vuejs project. I have around 15 pages where I am using charts and I want to change the font family everywhere. How to achieve this generically? Is there any general approach to change the fonts all together?

https://apexcharts.com/docs/options/chart/fontfamily/

This is the example where it's written how to change it in a specific way.

1 Answer 1

4

You can set global options just after you've imported and registered vue-apexcharts.

import VueApexCharts from "vue-apexcharts";

Vue.use(VueApexCharts);
window.Apex.chart = { fontFamily: "MuseoModerno, Arial, sans-serif" };

This will then be applied to all charts.

Of course, remember that you'll also need to make sure that the font is globally available in your Vue project by for example importing it.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.