Incubator-echarts: Setting Custom font

Created on 24 Dec 2019  ·  8Comments  ·  Source: apache/incubator-echarts

Version

4.5.0

Steps to reproduce

  1. Assign custom font to any fontStyles.

What is expected?

Need to add new font style

What is actually happening?

Accepting only predefined fonts


en support

Most helpful comment

All 8 comments

Hi! We've received your issue and please be patient to get responded. 🎉
The average response time is expected to be within one day for weekdays.

In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer.

If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to [email protected]. Please attach the issue link if it's a technical questions.

If you are interested in the project, you may also subscribe our mail list.

Have a nice day! 🍵

Could your provide more info about this issue?
For example, an option.

@Ovilia

textStyle
Global font style.
https://echarts.apache.org/en/option.html#textStyle

For example:
textStyle.fontFamily = 'Avenir Next'

besides just
'serif' , 'monospace', ...

Any custom font we may want to include in the page, can Echarts expand to support it? Can we point ECharts to the font we include? Any of the sort besides just a set list of fonts. Not sure what more of an explanation can be given. The ability to use any custom font we want to use besides the defaults.

@Ovilia why do you close this? I think its legitimate issue / feature request. It seems inconsistent if a website is using some fontFamily but using different one for charts.

Custom fonts are supported. You should load the fonts with CSS and set fontFamily to the name of those fonts.

@Ejstn The issue was closed because lack of activity (5 month).

@Ovilia Wow, I see. That's great and thanks for the demo. My bad, it didnt occur to me because the documentation says only "Can also be 'serif', 'monospace', ..."

我做了一个演示:https : //codepen.io/Ovilia/pen/ExVreNE
I tried VUE ,Font files are used in the configuration,But it still doesn't work,Mouse over the chart takes effect,What's the reason?

Was this page helpful?
0 / 5 - 0 ratings